<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="TOKN">﻿</span><span class="COMM">/*
<span class='line'>  2</span> Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
<span class='line'>  3</span> For licensing, see LICENSE.html or http://ckeditor.com/license
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span>
<span class='line'>  6</span> </span><span class="COMM">/**
<span class='line'>  7</span>  * @fileOverview The floating dialog plugin.
<span class='line'>  8</span>  */</span><span class="WHIT">
<span class='line'>  9</span>
<span class='line'> 10</span> </span><span class="NAME">CKEDITOR.plugins.add</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'dialog'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">		</span><span class="NAME">requires</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'dialogui'</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 14</span>
<span class='line'> 15</span> </span><span class="COMM">/**
<span class='line'> 16</span>  * No resize for this dialog.
<span class='line'> 17</span>  * @constant
<span class='line'> 18</span>  */</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_NONE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 20</span>
<span class='line'> 21</span> </span><span class="COMM">/**
<span class='line'> 22</span>  * Only allow horizontal resizing for this dialog, disable vertical resizing.
<span class='line'> 23</span>  * @constant
<span class='line'> 24</span>  */</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_WIDTH</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span>
<span class='line'> 27</span> </span><span class="COMM">/**
<span class='line'> 28</span>  * Only allow vertical resizing for this dialog, disable horizontal resizing.
<span class='line'> 29</span>  * @constant
<span class='line'> 30</span>  */</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_HEIGHT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span>
<span class='line'> 33</span> </span><span class="COMM">/*
<span class='line'> 34</span>  * Allow the dialog to be resized in both directions.
<span class='line'> 35</span>  * @constant
<span class='line'> 36</span>  */</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_BOTH</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 38</span>
<span class='line'> 39</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 42</span> 	 * This is the base class for runtime dialog objects. An instance of this
<span class='line'> 43</span> 	 * class represents a single named dialog for a single editor instance.
<span class='line'> 44</span> 	 * @param {Object} editor The editor which created the dialog.
<span class='line'> 45</span> 	 * @param {String} dialogName The dialog's registered name.
<span class='line'> 46</span> 	 * @constructor
<span class='line'> 47</span> 	 * @example
<span class='line'> 48</span> 	 * var dialogObj = new CKEDITOR.dialog( editor, 'smiley' );
<span class='line'> 49</span> 	 */</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">		</span><span class="COMM">// Load the dialog definition.</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.dialogDefinitions</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">			</span><span class="NAME">console.log</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'Error: The dialog "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" is not defined.'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 59</span>
<span class='line'> 60</span> </span><span class="WHIT">		</span><span class="COMM">// Completes the definition with the default values.</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">		</span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">defaultDialogDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span>
<span class='line'> 63</span> </span><span class="WHIT">		</span><span class="COMM">// Create a complex definition object, extending it with the API</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">		</span><span class="COMM">// functions.</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">		</span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">definitionObject</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span>
<span class='line'> 67</span> </span><span class="WHIT">		</span><span class="COMM">// Fire the "dialogDefinition" event, making it possible to customize</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">		</span><span class="COMM">// the dialog definition.</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">		</span><span class="NAME">this.definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'dialogDefinition'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">				</span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">				</span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">			</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">definition</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span>
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">themeBuilt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editor.theme.buildDialog</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span>
<span class='line'> 78</span> </span><span class="WHIT">		</span><span class="COMM">// Initialize some basic parameters.</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">		</span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">			</span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">			</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">themeBuilt.element</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">			</span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">			</span><span class="NAME">size</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">			</span><span class="NAME">contents</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">			</span><span class="NAME">buttons</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">			</span><span class="NAME">accessKeyMap</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 88</span>
<span class='line'> 89</span> </span><span class="WHIT">			</span><span class="COMM">// Initialize the tab and page map.</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">			</span><span class="NAME">tabs</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">			</span><span class="NAME">pageCount</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">			</span><span class="NAME">lastTab</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 94</span>
<span class='line'> 95</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'> 96</span> 		 * An associative map of elements in the dialog. It has the following members:
<span class='line'> 97</span> 		 * &lt;ul>
<span class='line'> 98</span> 		 * 	&lt;li>tl - top left corner.&lt;/li>
<span class='line'> 99</span> 		 * 	&lt;li>tl_resize - resize handle at the top left corner.&lt;/li>
<span class='line'>100</span> 		 * 	&lt;li>t - top side.&lt;/li>
<span class='line'>101</span> 		 * 	&lt;li>t_resize - resize handle at the top.&lt;/li>
<span class='line'>102</span> 		 * 	&lt;li>tr - top right corner.&lt;/li>
<span class='line'>103</span> 		 * 	&lt;li>tr_resize - resize handle at the top right.&lt;/li>
<span class='line'>104</span> 		 * 	&lt;li>l - left side.&lt;/li>
<span class='line'>105</span> 		 * 	&lt;li>l_resize - resize handle at the left side.&lt;/li>
<span class='line'>106</span> 		 * 	&lt;li>c - center area.&lt;/li>
<span class='line'>107</span> 		 * 	&lt;li>r - right side.&lt;/li>
<span class='line'>108</span> 		 * 	&lt;li>r_resize - resize handle at the right side.&lt;/li>
<span class='line'>109</span> 		 * 	&lt;li>bl - bottom left corner.&lt;/li>
<span class='line'>110</span> 		 * 	&lt;li>bl_resize - resize handle at the bottom left.&lt;/li>
<span class='line'>111</span> 		 * 	&lt;li>b - bottom side.&lt;/li>
<span class='line'>112</span> 		 * 	&lt;li>b_resize - resize handle at the bottom.&lt;/li>
<span class='line'>113</span> 		 * 	&lt;li>br - bottom right corner.&lt;/li>
<span class='line'>114</span> 		 * 	&lt;li>br_resize - resize handle at the bottom right.&lt;/li>
<span class='line'>115</span> 		 * 	&lt;li>title - title area.&lt;/li>
<span class='line'>116</span> 		 * 	&lt;li>close - close button.&lt;/li>
<span class='line'>117</span> 		 * 	&lt;li>tabs - tabs area.&lt;/li>
<span class='line'>118</span> 		 * 	&lt;li>contents - the content page area.&lt;/li>
<span class='line'>119</span> 		 * 	&lt;li>footer - the footer area.&lt;/li>
<span class='line'>120</span> 		 * &lt;/ul>
<span class='line'>121</span> 		 * @type Object
<span class='line'>122</span> 		 * @field
<span class='line'>123</span> 		 */</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">		</span><span class="NAME">this.parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">			</span><span class="STRN">'tl'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">			</span><span class="STRN">'tl_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">			</span><span class="STRN">'t'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">			</span><span class="STRN">'t_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">			</span><span class="STRN">'tr'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">			</span><span class="STRN">'tr_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">			</span><span class="STRN">'l'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">			</span><span class="STRN">'l_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">			</span><span class="STRN">'c'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">			</span><span class="STRN">'r'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">			</span><span class="STRN">'r_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">			</span><span class="STRN">'bl'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">			</span><span class="STRN">'bl_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">			</span><span class="STRN">'b'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">			</span><span class="STRN">'b_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">			</span><span class="STRN">'br'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">			</span><span class="STRN">'br_resize'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">			</span><span class="STRN">'title'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">			</span><span class="STRN">'close'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">			</span><span class="STRN">'tabs'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">			</span><span class="STRN">'tabs_table'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">			</span><span class="STRN">'contents'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">			</span><span class="STRN">'footer'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>149</span>
<span class='line'>150</span> </span><span class="WHIT">		</span><span class="COMM">// Initialize the parts map.</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.element.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.parts</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">			</span><span class="NAME">this.parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">element.getChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>154</span>
<span class='line'>155</span> </span><span class="WHIT">		</span><span class="COMM">// Call the CKEDITOR.event constructor to initialize this instance.</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.event.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span>
<span class='line'>158</span> </span><span class="WHIT">		</span><span class="COMM">// Initialize load, show, hide, ok and cancel events.</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onLoad</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'load'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition.onLoad</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span>
<span class='line'>162</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onShow</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'show'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition.onShow</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span>
<span class='line'>165</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onHide</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'hide'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition.onHide</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>167</span>
<span class='line'>168</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onOk</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'ok'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onOk.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">						</span><span class="NAME">evt.data.hide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>176</span>
<span class='line'>177</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onCancel</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.onCancel.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">						</span><span class="NAME">evt.data.hide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>185</span>
<span class='line'>186</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">me</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span>
<span class='line'>188</span> </span><span class="WHIT">		</span><span class="COMM">// Iterates over all items inside all content in the dialog, calling a</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">		</span><span class="COMM">// function for each of them.</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">iterContents</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">me._.contents</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">				</span><span class="NAME">stop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>194</span>
<span class='line'>195</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">					</span><span class="NAME">stop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">func.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">stop</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>205</span>
<span class='line'>206</span> </span><span class="WHIT">		</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'ok'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">				</span><span class="NAME">iterContents</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.validate</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">							</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isValid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item.validate</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>213</span>
<span class='line'>214</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">isValid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">							</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">								</span><span class="NAME">alert</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">isValid</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">								</span><span class="NAME">isValid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">							</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>219</span>
<span class='line'>220</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">isValid</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">							</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">								</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.select</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">									</span><span class="NAME">item.select</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">								</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>225</span> </span><span class="WHIT">									</span><span class="NAME">item.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>226</span>
<span class='line'>227</span> </span><span class="WHIT">								</span><span class="NAME">evt.data.hide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">								</span><span class="NAME">evt.stop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>229</span> </span><span class="WHIT">								</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">							</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>234</span>
<span class='line'>235</span> </span><span class="WHIT">		</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT">				</span><span class="NAME">iterContents</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.isChanged</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">confirm</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor.lang.common.confirmCancel</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">								</span><span class="NAME">evt.data.hide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT">							</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>247</span>
<span class='line'>248</span> </span><span class="WHIT">		</span><span class="NAME">this.parts.close.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'click'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">						</span><span class="NAME">this.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>253</span>
<span class='line'>254</span> </span><span class="WHIT">		</span><span class="COMM">// IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (#2661).</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">		</span><span class="COMM">// This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken.</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">			</span><span class="NAME">this.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'load'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">outer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">							</span><span class="NAME">inner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">outer.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">						</span><span class="NAME">inner.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">						</span><span class="NAME">inner.appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">outer</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>266</span>
<span class='line'>267</span> </span><span class="WHIT">		</span><span class="NAME">initDragAndDrop</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">		</span><span class="NAME">initResizeHandles</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>269</span>
<span class='line'>270</span> </span><span class="WHIT">		</span><span class="COMM">// Insert the title.</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">		</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.text</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.title</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.parts.title</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>272</span>
<span class='line'>273</span> </span><span class="WHIT">		</span><span class="COMM">// Insert the tabs and contents.</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">definition.contents.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">			</span><span class="NAME">this.addPage</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span>
<span class='line'>277</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/cke_dialog_tab(\s|$|_)/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">			</span><span class="NAME">tabOuterRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/cke_dialog_tab(\s|$)/</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">		</span><span class="NAME">this.parts</span><span class="PUNC">[</span><span class="STRN">'tabs'</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'click'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.getTarget</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">firstNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">target</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">page</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span>
<span class='line'>283</span> </span><span class="WHIT">					</span><span class="COMM">// If we aren't inside a tab, bail out.</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">tabRegex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">target.$.className</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>286</span>
<span class='line'>287</span> </span><span class="WHIT">					</span><span class="COMM">// Find the outer &lt;td> container of the tab.</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT">					</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">target.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'td'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">tabOuterRegex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">target.$.className</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">						</span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">target.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT">					</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">target.$.id.substr</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">target.$.id.lastIndexOf</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'_'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT">					</span><span class="NAME">this.selectPage</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>295</span>
<span class='line'>296</span> </span><span class="WHIT">		</span><span class="COMM">// Insert buttons.</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">buttonsHtml</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>298</span> </span><span class="WHIT">			</span><span class="NAME">buttons</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.uiElementBuilders.hbox.build</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>299</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>300</span> </span><span class="WHIT">					</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'hbox'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>301</span> </span><span class="WHIT">					</span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_footer_buttons'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT">					</span><span class="NAME">widths</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>303</span> </span><span class="WHIT">					</span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">definition.buttons</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">buttonsHtml</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getChild</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT">		</span><span class="NAME">this.parts.footer.setHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">buttonsHtml.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>306</span>
<span class='line'>307</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">buttons.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT">			</span><span class="NAME">this._.buttons</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">buttons</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">buttons</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>309</span>
<span class='line'>310</span> </span><span class="WHIT">		</span><span class="COMM">// Insert dummy text box for grabbing focus away from the editing area.</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT">		</span><span class="NAME">this._.dummyText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element.createFromHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;input type="text" style="position: absolute; left: -100000px; top: -100000px" />'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">		</span><span class="NAME">this._.dummyText.appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>313</span>
<span class='line'>314</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.skins.load</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor.config.skin</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'dialog'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>316</span>
<span class='line'>317</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dialog.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>319</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>320</span> 		 * Resizes the dialog.
<span class='line'>321</span> 		 * @param {Number} width The width of the dialog in pixels.
<span class='line'>322</span> 		 * @param {Number} height The height of the dialog in pixels.
<span class='line'>323</span> 		 * @function
<span class='line'>324</span> 		 * @example
<span class='line'>325</span> 		 * dialogObj.resize( 800, 640 );
<span class='line'>326</span> 		 */</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT">		</span><span class="NAME">resize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>329</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">width</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>330</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.size</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.size.width</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.size.height</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>332</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>333</span>
<span class='line'>334</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'resize'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>336</span> </span><span class="WHIT">						</span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>337</span> </span><span class="WHIT">						</span><span class="NAME">skin</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this._.editor.config.skin</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>338</span> </span><span class="WHIT">						</span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">width</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>339</span> </span><span class="WHIT">						</span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT">
<span class='line'>340</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._.editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>341</span>
<span class='line'>342</span> </span><span class="WHIT">				</span><span class="NAME">this._.size</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">width</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>345</span>
<span class='line'>346</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>347</span> 		 * Gets the current size of the dialog in pixels.
<span class='line'>348</span> 		 * @returns {Object} An object with "width" and "height" properties.
<span class='line'>349</span> 		 * @example
<span class='line'>350</span> 		 * var width = dialogObj.getSize().width;
<span class='line'>351</span> 		 */</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT">		</span><span class="NAME">getSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>353</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>354</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._.size</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>355</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>356</span>
<span class='line'>357</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>358</span> 		 * Moves the dialog to an (x, y) coordinate relative to the window.
<span class='line'>359</span> 		 * @function
<span class='line'>360</span> 		 * @param {Number} x The target x-coordinate.
<span class='line'>361</span> 		 * @param {Number} y The target y-coordinate.
<span class='line'>362</span> 		 * @example
<span class='line'>363</span> 		 * dialogObj.move( 10, 40 );
<span class='line'>364</span> 		 */</span><span class="WHIT">
<span class='line'>365</span> </span><span class="WHIT">		</span><span class="NAME">move</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>366</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>367</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isFixed</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>368</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">				</span><span class="COMM">// The dialog may be fixed positioned or absolute positioned. Ask the</span><span class="WHIT">
<span class='line'>371</span> </span><span class="WHIT">				</span><span class="COMM">// browser what is the current situation first.</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">isFixed</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT">					</span><span class="NAME">isFixed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.element.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getComputedStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'position'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'fixed'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>374</span>
<span class='line'>375</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">isFixed</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.position</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.position.x</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.position.y</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>376</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>377</span>
<span class='line'>378</span> </span><span class="WHIT">				</span><span class="COMM">// Save the current position.</span><span class="WHIT">
<span class='line'>379</span> </span><span class="WHIT">				</span><span class="NAME">this._.position</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>380</span>
<span class='line'>381</span> </span><span class="WHIT">				</span><span class="COMM">// If not fixed positioned, add scroll position to the coordinates.</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">isFixed</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scrollPosition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getScrollPosition</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT">					</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">scrollPosition.x</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">					</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">scrollPosition.y</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>388</span>
<span class='line'>389</span> </span><span class="WHIT">				</span><span class="NAME">this._.element.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setStyles</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>390</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT">							</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>392</span> </span><span class="WHIT">							</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="WHIT">
<span class='line'>393</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>394</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>396</span>
<span class='line'>397</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>398</span> 		 * Gets the dialog's position in the window.
<span class='line'>399</span> 		 * @returns {Object} An object with "x" and "y" properties.
<span class='line'>400</span> 		 * @example
<span class='line'>401</span> 		 * var dialogX = dialogObj.getPosition().x;
<span class='line'>402</span> 		 */</span><span class="WHIT">
<span class='line'>403</span> </span><span class="WHIT">		</span><span class="NAME">getPosition</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._.position</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>404</span>
<span class='line'>405</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>406</span> 		 * Shows the dialog box.
<span class='line'>407</span> 		 * @example
<span class='line'>408</span> 		 * dialogObj.show();
<span class='line'>409</span> 		 */</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT">		</span><span class="NAME">show</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>411</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>412</span> </span><span class="WHIT">			</span><span class="COMM">// Insert the dialog's element to the root document.</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.definition</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>415</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">element.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">equals</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getBody</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>416</span> </span><span class="WHIT">				</span><span class="NAME">element.appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getBody</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>417</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>418</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>419</span>
<span class='line'>420</span> </span><span class="WHIT">			</span><span class="COMM">// First, set the dialog to an appropriate size.</span><span class="WHIT">
<span class='line'>421</span> </span><span class="WHIT">			</span><span class="NAME">this.resize</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition.minWidth</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition.minHeight</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>422</span>
<span class='line'>423</span> </span><span class="WHIT">			</span><span class="COMM">// Rearrange the dialog to the middle of the window.</span><span class="WHIT">
<span class='line'>424</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">viewSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getViewPaneSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>425</span> </span><span class="WHIT">			</span><span class="NAME">this.move</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">viewSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">this._.size.width</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">viewSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">this._.size.height</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>426</span>
<span class='line'>427</span> </span><span class="WHIT">			</span><span class="COMM">// Select the first tab by default.</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">			</span><span class="NAME">this.selectPage</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.definition.contents</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>429</span>
<span class='line'>430</span> </span><span class="WHIT">			</span><span class="COMM">// Reset all inputs back to their default value.</span><span class="WHIT">
<span class='line'>431</span> </span><span class="WHIT">			</span><span class="NAME">this.reset</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>432</span>
<span class='line'>433</span> </span><span class="WHIT">			</span><span class="COMM">// Set z-index.</span><span class="WHIT">
<span class='line'>434</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.currentZIndex</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>435</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog._.currentZIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.editor.config.baseFloatZIndex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">			</span><span class="NAME">this._.element.getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'z-index'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.currentZIndex</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>437</span>
<span class='line'>438</span> </span><span class="WHIT">			</span><span class="COMM">// Maintain the dialog ordering and dialog cover.</span><span class="WHIT">
<span class='line'>439</span> </span><span class="WHIT">			</span><span class="COMM">// Also register key handlers if first dialog.</span><span class="WHIT">
<span class='line'>440</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>441</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>442</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">				</span><span class="NAME">this._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">				</span><span class="NAME">addCover</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>445</span>
<span class='line'>446</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'keydown'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">accessKeyDownHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>447</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'keyup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">accessKeyUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>448</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>449</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>450</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>451</span> </span><span class="WHIT">				</span><span class="NAME">this._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>452</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parentElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.parentDialog.getElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">				</span><span class="NAME">parentElement.$.style.zIndex</span><span class="WHIT">  </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.config.baseFloatZIndex</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>456</span>
<span class='line'>457</span> </span><span class="WHIT">			</span><span class="COMM">// Register the Esc hotkeys.</span><span class="WHIT">
<span class='line'>458</span> </span><span class="WHIT">			</span><span class="NAME">registerAccessKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'\x1b'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>459</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT">						</span><span class="NAME">this.getButton</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.getButton</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">click</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>462</span>
<span class='line'>463</span> </span><span class="WHIT">			</span><span class="COMM">// Save editor selection and grab the focus.</span><span class="WHIT">
<span class='line'>464</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>465</span> </span><span class="WHIT">				</span><span class="NAME">this.saveSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>466</span> </span><span class="WHIT">			</span><span class="NAME">this._.dummyText.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>467</span> </span><span class="WHIT">			</span><span class="NAME">this._.dummyText.$.select</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>468</span>
<span class='line'>469</span> </span><span class="WHIT">			</span><span class="COMM">// Execute onLoad for the first show.</span><span class="WHIT">
<span class='line'>470</span> </span><span class="WHIT">			</span><span class="NAME">this.fireOnce</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'load'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>471</span> </span><span class="WHIT">			</span><span class="NAME">this.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'show'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>473</span>
<span class='line'>474</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>475</span> 		 * Executes a function for each UI element.
<span class='line'>476</span> 		 * @param {Function} fn Function to execute for each UI element.
<span class='line'>477</span> 		 * @returns {CKEDITOR.dialog} The current dialog object.
<span class='line'>478</span> 		 */</span><span class="WHIT">
<span class='line'>479</span> </span><span class="WHIT">		</span><span class="NAME">foreach</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>481</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._.contents</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._.contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">					</span><span class="NAME">fn</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>488</span>
<span class='line'>489</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>490</span> 		 * Resets all input values in the dialog.
<span class='line'>491</span> 		 * @example
<span class='line'>492</span> 		 * dialogObj.reset();
<span class='line'>493</span> 		 * @returns {CKEDITOR.dialog} The current dialog object.
<span class='line'>494</span> 		 */</span><span class="WHIT">
<span class='line'>495</span> </span><span class="WHIT">		</span><span class="NAME">reset</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>496</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>497</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget.reset</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">widget.reset</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>498</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">this.foreach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>499</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>500</span>
<span class='line'>501</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>502</span> 		 * Pushes the current values of all inputs in the dialog into the default stack.
<span class='line'>503</span> 		 * @example
<span class='line'>504</span> 		 * dialogObj.pushDefault();
<span class='line'>505</span> 		 * @returns {CKEDITOR.dialog} The current dialog object.
<span class='line'>506</span> 		 */</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">		</span><span class="NAME">pushDefault</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget.pushDefault</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">widget.pushDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">this.foreach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>511</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>512</span>
<span class='line'>513</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>514</span> 		 * Pops the current default values of all inputs in the dialog.
<span class='line'>515</span> 		 * @example
<span class='line'>516</span> 		 * dialogObj.popDefault();
<span class='line'>517</span> 		 * @returns {CKEDITOR.dialog} The current dialog object.
<span class='line'>518</span> 		 */</span><span class="WHIT">
<span class='line'>519</span> </span><span class="WHIT">		</span><span class="NAME">popDefault</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>520</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>521</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget.popDefault</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">widget.popDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>522</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">this.foreach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>523</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>524</span>
<span class='line'>525</span> </span><span class="WHIT">		</span><span class="NAME">setupContent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>527</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>528</span> </span><span class="WHIT">			</span><span class="NAME">this.foreach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>529</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>530</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget.setup</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>531</span> </span><span class="WHIT">						</span><span class="NAME">widget.setup.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>532</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>533</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>534</span>
<span class='line'>535</span> </span><span class="WHIT">		</span><span class="NAME">commitContent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>536</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>537</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>538</span> </span><span class="WHIT">			</span><span class="NAME">this.foreach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>539</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>540</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget.commit</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>541</span> </span><span class="WHIT">						</span><span class="NAME">widget.commit.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widget</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>542</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>543</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>544</span>
<span class='line'>545</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>546</span> 		 * Hides the dialog box.
<span class='line'>547</span> 		 * @example
<span class='line'>548</span> 		 * dialogObj.hide();
<span class='line'>549</span> 		 */</span><span class="WHIT">
<span class='line'>550</span> </span><span class="WHIT">		</span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>551</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>552</span> </span><span class="WHIT">			</span><span class="COMM">// Remove the dialog's element from the root document.</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">element.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>556</span> </span><span class="WHIT">			</span><span class="NAME">element.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>557</span>
<span class='line'>558</span> </span><span class="WHIT">			</span><span class="COMM">// Unregister all access keys associated with this dialog.</span><span class="WHIT">
<span class='line'>559</span> </span><span class="WHIT">			</span><span class="NAME">unregisterAccessKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>560</span>
<span class='line'>561</span> </span><span class="WHIT">			</span><span class="COMM">// Maintain dialog ordering and remove cover if needed.</span><span class="WHIT">
<span class='line'>562</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">				</span><span class="NAME">removeCover</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>565</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>566</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parentElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.parentDialog.getElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>567</span> </span><span class="WHIT">				</span><span class="NAME">parentElement.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'z-index'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parentElement.$.style.zIndex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.config.baseFloatZIndex</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>568</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>569</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.parentDialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>570</span>
<span class='line'>571</span> </span><span class="WHIT">			</span><span class="COMM">// Deduct or clear the z-index.</span><span class="WHIT">
<span class='line'>572</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog._.currentZIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>575</span>
<span class='line'>576</span> </span><span class="WHIT">				</span><span class="COMM">// Remove access key handlers.</span><span class="WHIT">
<span class='line'>577</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'keydown'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">accessKeyDownHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>578</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'keyup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">accessKeyUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>579</span>
<span class='line'>580</span> </span><span class="WHIT">				</span><span class="COMM">// Restore focus and (if not already restored) selection in the editing area.</span><span class="WHIT">
<span class='line'>581</span> </span><span class="WHIT">				</span><span class="NAME">this.restoreSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>582</span> </span><span class="WHIT">				</span><span class="NAME">this._.editor.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>583</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>584</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>585</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.dialog._.currentZIndex</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>586</span>
<span class='line'>587</span> </span><span class="WHIT">			</span><span class="NAME">this.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'hide'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>588</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>589</span>
<span class='line'>590</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>591</span> 		 * Adds a tabbed page into the dialog.
<span class='line'>592</span> 		 * @param {Object} contents Content definition.
<span class='line'>593</span> 		 * @example
<span class='line'>594</span> 		 */</span><span class="WHIT">
<span class='line'>595</span> </span><span class="WHIT">		</span><span class="NAME">addPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>596</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>597</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pageHtml</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT">				</span><span class="NAME">titleHtml</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">contents.title</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'title="'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.htmlEncode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contents.title</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>599</span> </span><span class="WHIT">				</span><span class="NAME">elements</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">contents.elements</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>600</span> </span><span class="WHIT">				</span><span class="NAME">vbox</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.uiElementBuilders.vbox.build</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>601</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>602</span> </span><span class="WHIT">							</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'vbox'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>603</span> </span><span class="WHIT">							</span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_page_contents'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>604</span> </span><span class="WHIT">							</span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">contents.elements</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT">							</span><span class="NAME">expand</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">!</span><span class="NAME">contents.expand</span><span class="WHIT">
<span class='line'>606</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pageHtml</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>607</span>
<span class='line'>608</span> </span><span class="WHIT">			</span><span class="COMM">// Create the HTML for the tab and the content block.</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">page</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element.createFromHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageHtml.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>610</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element.createFromHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">					</span><span class="STRN">'&lt;table>&lt;tbody>&lt;tr>&lt;td class="cke_dialog_tab" '</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">titleHtml</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'>'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">					</span><span class="STRN">'&lt;table border="0" cellspacing="0" cellpadding="0">&lt;tbody>&lt;tr>'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>613</span> </span><span class="WHIT">						</span><span class="STRN">'&lt;td class="cke_dialog_tab_left">&lt;/td>'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>614</span> </span><span class="WHIT">						</span><span class="STRN">'&lt;td class="cke_dialog_tab_center">'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">							</span><span class="NAME">CKEDITOR.tools.htmlEncode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contents.label.replace</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="REGX">/ /g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'\xa0'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>616</span> </span><span class="WHIT">						</span><span class="STRN">'&lt;/td>'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT">						</span><span class="STRN">'&lt;td class="cke_dialog_tab_right">&lt;/td>'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">					</span><span class="STRN">'&lt;/tr>&lt;/tbody>&lt;/table>&lt;/td>&lt;/tr>&lt;/tbody>&lt;/table>'</span><span class="WHIT">
<span class='line'>619</span> </span><span class="WHIT">				</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>620</span> </span><span class="WHIT">			</span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">tab.getChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>621</span>
<span class='line'>622</span> </span><span class="WHIT">			</span><span class="COMM">// First and last tab styles classes.</span><span class="WHIT">
<span class='line'>623</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.lastTab</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>624</span> </span><span class="WHIT">				</span><span class="NAME">this._.lastTab.removeClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'last'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>625</span> </span><span class="WHIT">			</span><span class="NAME">tab.addClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.pageCount</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'last'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'first'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>626</span>
<span class='line'>627</span> </span><span class="WHIT">			</span><span class="COMM">// If only a single page exist, a different style is used in the central pane.</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.pageCount</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT">				</span><span class="NAME">this.parts.c.addClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'single_page'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>630</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>631</span> </span><span class="WHIT">				</span><span class="NAME">this.parts.c.removeClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'single_page'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>632</span>
<span class='line'>633</span> </span><span class="WHIT">			</span><span class="COMM">// Take records for the tabs and elements created.</span><span class="WHIT">
<span class='line'>634</span> </span><span class="WHIT">			</span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">contents.id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">page</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>635</span> </span><span class="WHIT">			</span><span class="NAME">this._.pageCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>636</span> </span><span class="WHIT">			</span><span class="NAME">this._.lastTab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">contentMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.contents</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">contents.id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT">				</span><span class="NAME">cursor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>639</span> </span><span class="WHIT">				</span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">vbox.getChild</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>640</span> </span><span class="WHIT">			</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">children.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>641</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>642</span> </span><span class="WHIT">				</span><span class="NAME">contentMap</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">cursor.id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cursor</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>643</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">cursor.getChild</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>644</span> </span><span class="WHIT">					</span><span class="NAME">children.push.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">children</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">cursor.getChild</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>645</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>646</span>
<span class='line'>647</span> </span><span class="WHIT">			</span><span class="COMM">// Attach the DOM nodes.</span><span class="WHIT">
<span class='line'>648</span> </span><span class="WHIT">			</span><span class="NAME">tab.unselectable</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>649</span> </span><span class="WHIT">			</span><span class="NAME">page.appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.parts.contents</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>650</span> </span><span class="WHIT">			</span><span class="NAME">tab.insertBefore</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.parts.tabs.getChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.parts.tabs.getChildCount</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>651</span> </span><span class="WHIT">			</span><span class="NAME">tab.setAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contents.id</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'_'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.getNextNumber</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>652</span> </span><span class="WHIT">			</span><span class="NAME">page.setAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'name'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contents.id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>653</span>
<span class='line'>654</span> </span><span class="WHIT">			</span><span class="COMM">// Add access key handlers if access key is defined.</span><span class="WHIT">
<span class='line'>655</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contents.accessKey</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>656</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>657</span> </span><span class="WHIT">				</span><span class="NAME">registerAccessKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'CTRL+'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">contents.accessKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>658</span> </span><span class="WHIT">					</span><span class="NAME">tabAccessKeyDown</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">tabAccessKeyUp</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>659</span> </span><span class="WHIT">				</span><span class="NAME">this._.accessKeyMap</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'CTRL+'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">contents.accessKey</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">contents.id</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>660</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>661</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>662</span>
<span class='line'>663</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>664</span> 		 * Activates a tab page in the dialog by its id.
<span class='line'>665</span> 		 * @param {String} id The id of the dialog tab to be activated.
<span class='line'>666</span> 		 * @example
<span class='line'>667</span> 		 * dialogObj.selectPage( 'tab_1' );
<span class='line'>668</span> 		 */</span><span class="WHIT">
<span class='line'>669</span> </span><span class="WHIT">		</span><span class="NAME">selectPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>670</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>671</span> </span><span class="WHIT">			</span><span class="COMM">// Hide the non-selected tabs and pages.</span><span class="WHIT">
<span class='line'>672</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>673</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>674</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>675</span> </span><span class="WHIT">					</span><span class="NAME">page</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>676</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>678</span> </span><span class="WHIT">					</span><span class="NAME">tab.removeClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_tab_selected'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>679</span> </span><span class="WHIT">					</span><span class="NAME">page.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>680</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>682</span>
<span class='line'>683</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">selected</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">id</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>684</span> </span><span class="WHIT">			</span><span class="NAME">selected</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_tab_selected'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">			</span><span class="NAME">selected</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">me</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>687</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>688</span>
<span class='line'>689</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>690</span> 		 * Hides a page's tab away from the dialog.
<span class='line'>691</span> 		 * @param {String} id The page's Id.
<span class='line'>692</span> 		 * @example
<span class='line'>693</span> 		 * dialog.hidePage( 'tab_3' );
<span class='line'>694</span> 		 */</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">		</span><span class="NAME">hidePage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>697</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">id</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">id</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>698</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>699</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>700</span> </span><span class="WHIT">			</span><span class="NAME">tab.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>701</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>702</span>
<span class='line'>703</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>704</span> 		 * Unhides a page's tab.
<span class='line'>705</span> 		 * @param {String} id The page's Id.
<span class='line'>706</span> 		 * @example
<span class='line'>707</span> 		 * dialog.showPage( 'tab_2' );
<span class='line'>708</span> 		 */</span><span class="WHIT">
<span class='line'>709</span> </span><span class="WHIT">		</span><span class="NAME">showPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>710</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>711</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">id</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.tabs</span><span class="PUNC">[</span><span class="NAME">id</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>712</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">tab</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>713</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>714</span> </span><span class="WHIT">			</span><span class="NAME">tab.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>715</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>716</span>
<span class='line'>717</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>718</span> 		 * Gets the root DOM element of the dialog.
<span class='line'>719</span> 		 * @returns {CKEDITOR.dom.element} The &lt;span&gt; element containing this dialog.
<span class='line'>720</span> 		 * @example
<span class='line'>721</span> 		 * var dialogElement = dialogObj.getElement().getFirst();
<span class='line'>722</span> 		 * dialogElement.setStyle( 'padding', '5px' );
<span class='line'>723</span> 		 */</span><span class="WHIT">
<span class='line'>724</span> </span><span class="WHIT">		</span><span class="NAME">getElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>725</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>726</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.element</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>727</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>728</span>
<span class='line'>729</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>730</span> 		 * Gets a dialog UI element object from a dialog page.
<span class='line'>731</span> 		 * @param {String} pageId id of dialog page.
<span class='line'>732</span> 		 * @param {String} elementId id of UI element.
<span class='line'>733</span> 		 * @example
<span class='line'>734</span> 		 * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.
<span class='line'>735</span> 		 */</span><span class="WHIT">
<span class='line'>736</span> </span><span class="WHIT">		</span><span class="NAME">getContentElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>737</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>738</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.contents</span><span class="PUNC">[</span><span class="NAME">pageId</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">elementId</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>739</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>740</span>
<span class='line'>741</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>742</span> 		 * Gets the value of a dialog UI element.
<span class='line'>743</span> 		 * @param {String} pageId id of dialog page.
<span class='line'>744</span> 		 * @param {String} elementId id of UI element.
<span class='line'>745</span> 		 * @example
<span class='line'>746</span> 		 * @returns {Object} The value of the UI element.
<span class='line'>747</span> 		 */</span><span class="WHIT">
<span class='line'>748</span> </span><span class="WHIT">		</span><span class="NAME">getValueOf</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>749</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>750</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getContentElement</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>751</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>752</span>
<span class='line'>753</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>754</span> 		 * Sets the value of a dialog UI element.
<span class='line'>755</span> 		 * @param {String} pageId id of the dialog page.
<span class='line'>756</span> 		 * @param {String} elementId id of the UI element.
<span class='line'>757</span> 		 * @param {Object} value The new value of the UI element.
<span class='line'>758</span> 		 * @example
<span class='line'>759</span> 		 */</span><span class="WHIT">
<span class='line'>760</span> </span><span class="WHIT">		</span><span class="NAME">setValueOf</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>761</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>762</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getContentElement</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pageId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>763</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>764</span>
<span class='line'>765</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>766</span> 		 * Gets the UI element of a button in the dialog's button row.
<span class='line'>767</span> 		 * @param {String} id The id of the button.
<span class='line'>768</span> 		 * @example
<span class='line'>769</span> 		 * @returns {CKEDITOR.ui.dialog.button} The button object.
<span class='line'>770</span> 		 */</span><span class="WHIT">
<span class='line'>771</span> </span><span class="WHIT">		</span><span class="NAME">getButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>772</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>773</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.buttons</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>774</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>775</span>
<span class='line'>776</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>777</span> 		 * Simulates a click to a dialog button in the dialog's button row.
<span class='line'>778</span> 		 * @param {String} id The id of the button.
<span class='line'>779</span> 		 * @example
<span class='line'>780</span> 		 * @returns The return value of the dialog's "click" event.
<span class='line'>781</span> 		 */</span><span class="WHIT">
<span class='line'>782</span> </span><span class="WHIT">		</span><span class="NAME">click</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>783</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>784</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.buttons</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">click</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>785</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>786</span>
<span class='line'>787</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>788</span> 		 * Disables a dialog button.
<span class='line'>789</span> 		 * @param {String} id The id of the button.
<span class='line'>790</span> 		 * @example
<span class='line'>791</span> 		 */</span><span class="WHIT">
<span class='line'>792</span> </span><span class="WHIT">		</span><span class="NAME">disableButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>793</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>794</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.buttons</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">disable</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>795</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>796</span>
<span class='line'>797</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>798</span> 		 * Enables a dialog button.
<span class='line'>799</span> 		 * @param {String} id The id of the button.
<span class='line'>800</span> 		 * @example
<span class='line'>801</span> 		 */</span><span class="WHIT">
<span class='line'>802</span> </span><span class="WHIT">		</span><span class="NAME">enableButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>803</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>804</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.buttons</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">enable</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>805</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>806</span>
<span class='line'>807</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>808</span> 		 * Gets the number of pages in the dialog.
<span class='line'>809</span> 		 * @returns {Number} Page count.
<span class='line'>810</span> 		 */</span><span class="WHIT">
<span class='line'>811</span> </span><span class="WHIT">		</span><span class="NAME">getPageCount</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>812</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>813</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.pageCount</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>814</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>815</span>
<span class='line'>816</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>817</span> 		 * Gets the editor instance which opened this dialog.
<span class='line'>818</span> 		 * @returns {CKEDITOR.editor} Parent editor instances.
<span class='line'>819</span> 		 */</span><span class="WHIT">
<span class='line'>820</span> </span><span class="WHIT">		</span><span class="NAME">getParentEditor</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>821</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>822</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.editor</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>823</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>824</span>
<span class='line'>825</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>826</span> 		 * Saves the current selection position in the editor.
<span class='line'>827</span> 		 * This function is automatically called when a non-nested dialog is opened,
<span class='line'>828</span> 		 * but it may also be called by event handlers in dialog definition.
<span class='line'>829</span> 		 * @example
<span class='line'>830</span> 		 */</span><span class="WHIT">
<span class='line'>831</span> </span><span class="WHIT">		</span><span class="NAME">saveSelection</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>832</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>833</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.mode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>834</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>835</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">selection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.selection</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>836</span> </span><span class="WHIT">				</span><span class="NAME">this._.selectedRanges</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">selection.getRanges</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>837</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>838</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>839</span>
<span class='line'>840</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>841</span> 		 * Clears the saved selection in the dialog object.
<span class='line'>842</span> 		 * This function should be called if the dialog's code has already changed the
<span class='line'>843</span> 		 * current selection position because the dialog closed. (e.g. at onOk())
<span class='line'>844</span> 		 * @example
<span class='line'>845</span> 		 */</span><span class="WHIT">
<span class='line'>846</span> </span><span class="WHIT">		</span><span class="NAME">clearSavedSelection</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT">			</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">this._.selectedRanges</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>849</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>850</span>
<span class='line'>851</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>852</span> 		 * Restores the editor's selection from the previously saved position in this
<span class='line'>853</span> 		 * dialog.
<span class='line'>854</span> 		 * This function is automatically called when a non-nested dialog is closed,
<span class='line'>855</span> 		 * but it may also be called by event handlers in dialog definition.
<span class='line'>856</span> 		 * @example
<span class='line'>857</span> 		 */</span><span class="WHIT">
<span class='line'>858</span> </span><span class="WHIT">		</span><span class="NAME">restoreSelection</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>859</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>860</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.mode</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.selectedRanges</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>861</span> </span><span class="WHIT">				</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.selection</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.editor.document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">selectRanges</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.selectedRanges</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>862</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>863</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>864</span>
<span class='line'>865</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>866</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>867</span> 		 * @lends CKEDITOR.dialog
<span class='line'>868</span> 		 */</span><span class="WHIT">
<span class='line'>869</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>870</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>871</span> 			 * Registers a dialog.
<span class='line'>872</span> 			 * @param {String} name The dialog's name.
<span class='line'>873</span> 			 * @param {Function|String} dialogDefinition
<span class='line'>874</span> 			 * A function returning the dialog's definition, or the URL to the .js file holding the function.
<span class='line'>875</span> 			 * The function should accept an argument "editor" which is the current editor instance, and
<span class='line'>876</span> 			 * return an object conforming to {@link CKEDITOR.dialog.dialogDefinition}.
<span class='line'>877</span> 			 * @example
<span class='line'>878</span> 			 * @see CKEDITOR.dialog.dialogDefinition
<span class='line'>879</span> 			 */</span><span class="WHIT">
<span class='line'>880</span> </span><span class="WHIT">			</span><span class="NAME">add</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>881</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>882</span> </span><span class="WHIT">				</span><span class="NAME">this._.dialogDefinitions</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialogDefinition</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>883</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>884</span>
<span class='line'>885</span> </span><span class="WHIT">			</span><span class="NAME">exists</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>886</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>887</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">!</span><span class="NAME">this._.dialogDefinitions</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>888</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>889</span>
<span class='line'>890</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>891</span> 			 * The default OK button for dialogs. Fires the "ok" event and closes the dialog if the event succeeds.
<span class='line'>892</span> 			 * @static
<span class='line'>893</span> 			 * @field
<span class='line'>894</span> 			 * @example
<span class='line'>895</span> 			 * @type Function
<span class='line'>896</span> 			 */</span><span class="WHIT">
<span class='line'>897</span> </span><span class="WHIT">			</span><span class="NAME">okButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>898</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>899</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>900</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>901</span> </span><span class="WHIT">					</span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>902</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>903</span> </span><span class="WHIT">						</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'ok'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>904</span> </span><span class="WHIT">						</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>905</span> </span><span class="WHIT">						</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">editor.lang.common.ok</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>906</span> </span><span class="WHIT">						</span><span class="NAME">style</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'width: 60px'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>907</span> </span><span class="WHIT">						</span><span class="NAME">onClick</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>908</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>909</span> </span><span class="WHIT">							</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>910</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'ok'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>911</span> </span><span class="WHIT">								</span><span class="NAME">dialog.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>912</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>913</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>914</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>915</span> </span><span class="WHIT">				</span><span class="NAME">retval.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>916</span> </span><span class="WHIT">				</span><span class="NAME">retval.override</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>917</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>918</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>919</span> </span><span class="WHIT">							</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>920</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>921</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>922</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>923</span>
<span class='line'>924</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>925</span> 			 * The default cancel button for dialogs. Fires the "cancel" event and closes the dialog if no UI element value changed.
<span class='line'>926</span> 			 * @static
<span class='line'>927</span> 			 * @field
<span class='line'>928</span> 			 * @example
<span class='line'>929</span> 			 * @type Function
<span class='line'>930</span> 			 */</span><span class="WHIT">
<span class='line'>931</span> </span><span class="WHIT">			</span><span class="NAME">cancelButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>932</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>933</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>934</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>935</span> </span><span class="WHIT">					</span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>936</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>937</span> </span><span class="WHIT">						</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>938</span> </span><span class="WHIT">						</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>939</span> </span><span class="WHIT">						</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">editor.lang.common.cancel</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>940</span> </span><span class="WHIT">						</span><span class="NAME">style</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'width: 60px'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>941</span> </span><span class="WHIT">						</span><span class="NAME">onClick</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>942</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>943</span> </span><span class="WHIT">							</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>944</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hide</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>945</span> </span><span class="WHIT">								</span><span class="NAME">dialog.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>946</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>947</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>948</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>949</span> </span><span class="WHIT">				</span><span class="NAME">retval.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>950</span> </span><span class="WHIT">				</span><span class="NAME">retval.override</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>951</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>952</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">override</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>953</span> </span><span class="WHIT">							</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'button'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>954</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>955</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>956</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>957</span>
<span class='line'>958</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>959</span> 			 * Registers a dialog UI element.
<span class='line'>960</span> 			 * @param {String} typeName The name of the UI element.
<span class='line'>961</span> 			 * @param {Function} builder The function to build the UI element.
<span class='line'>962</span> 			 * @example
<span class='line'>963</span> 			 */</span><span class="WHIT">
<span class='line'>964</span> </span><span class="WHIT">			</span><span class="NAME">addUIElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">typeName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">builder</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>965</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>966</span> </span><span class="WHIT">				</span><span class="NAME">this._.uiElementBuilders</span><span class="PUNC">[</span><span class="NAME">typeName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">builder</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>967</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>968</span>
<span class='line'>969</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>970</span> 			 * Sets the width of margins of dialogs, which is used for the dialog moving and resizing logic.
<span class='line'>971</span> 			 * The margin here means the area between the dialog's container &lt;div> and the visual boundary of the dialog.
<span class='line'>972</span> 			 * Typically this area is used for dialog shadows.
<span class='line'>973</span> 			 * This function is typically called in a skin's JavaScript files.
<span class='line'>974</span> 			 * @param {Number} top The top margin in pixels.
<span class='line'>975</span> 			 * @param {Number} right The right margin in pixels.
<span class='line'>976</span> 			 * @param {Number} bottom The bottom margin in pixels.
<span class='line'>977</span> 			 * @param {Number} left The left margin in pixels.
<span class='line'>978</span> 			 * @example
<span class='line'>979</span> 			 */</span><span class="WHIT">
<span class='line'>980</span> </span><span class="WHIT">			</span><span class="NAME">setMargins</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">top</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">right</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bottom</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">left</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>981</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>982</span> </span><span class="WHIT">				</span><span class="NAME">this._.margins</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">top</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">right</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bottom</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">left</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>983</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>984</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>985</span>
<span class='line'>986</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dialog._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>987</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>988</span> </span><span class="WHIT">		</span><span class="NAME">uiElementBuilders</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>989</span>
<span class='line'>990</span> </span><span class="WHIT">		</span><span class="NAME">dialogDefinitions</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>991</span>
<span class='line'>992</span> </span><span class="WHIT">		</span><span class="NAME">currentTop</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>993</span>
<span class='line'>994</span> </span><span class="WHIT">		</span><span class="NAME">currentZIndex</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>995</span>
<span class='line'>996</span> </span><span class="WHIT">		</span><span class="NAME">margins</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>997</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>998</span>
<span class='line'>999</span> </span><span class="WHIT">	</span><span class="COMM">// "Inherit" (copy actually) from CKEDITOR.event.</span><span class="WHIT">
<span class='line'>1000</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.event.implementOn</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1001</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.event.implementOn</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog.prototype</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1002</span>
<span class='line'>1003</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">defaultDialogDefinition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1004</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1005</span> </span><span class="WHIT">		</span><span class="NAME">resizable</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_NONE</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1006</span> </span><span class="WHIT">		</span><span class="NAME">minWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">600</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1007</span> </span><span class="WHIT">		</span><span class="NAME">minHeight</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">400</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1008</span> </span><span class="WHIT">		</span><span class="NAME">buttons</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog.okButton</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog.cancelButton</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>1009</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1010</span>
<span class='line'>1011</span> </span><span class="WHIT">	</span><span class="COMM">// Tool function used to return an item from an array based on its id</span><span class="WHIT">
<span class='line'>1012</span> </span><span class="WHIT">	</span><span class="COMM">// property.</span><span class="WHIT">
<span class='line'>1013</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">getById</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1014</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1015</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1016</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1017</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.id</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1018</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1019</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1020</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1021</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1022</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1023</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1024</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1025</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1026</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1027</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1028</span>
<span class='line'>1029</span> </span><span class="WHIT">	</span><span class="COMM">// Tool function used to add an item into an array.</span><span class="WHIT">
<span class='line'>1030</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">addById</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nullIfNotFound</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1031</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1032</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1033</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1034</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1035</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1036</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.id</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1037</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1038</span> </span><span class="WHIT">					</span><span class="NAME">array.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1039</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1040</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1041</span>
<span class='line'>1042</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1043</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1044</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">addById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1045</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1046</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1047</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1048</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1049</span>
<span class='line'>1050</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nullIfNotFound</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1051</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1052</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1053</span>
<span class='line'>1054</span> </span><span class="WHIT">		</span><span class="NAME">array.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1055</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">newItem</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1056</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1057</span>
<span class='line'>1058</span> </span><span class="WHIT">	</span><span class="COMM">// Tool function used to remove an item from an array based on its id.</span><span class="WHIT">
<span class='line'>1059</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">removeById</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1060</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1061</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">array</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1062</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1063</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item.id</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1064</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">array.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1065</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1066</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1067</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">removeById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurse</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1068</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1069</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">retval</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1070</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1071</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1072</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1073</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1074</span>
<span class='line'>1075</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>1076</span> 	 * This class is not really part of the API. It is the "definition" property value
<span class='line'>1077</span> 	 * passed to "dialogDefinition" event handlers.
<span class='line'>1078</span> 	 * @constructor
<span class='line'>1079</span> 	 * @name CKEDITOR.dialog.dialogDefinitionObject
<span class='line'>1080</span> 	 * @extends CKEDITOR.dialog.dialogDefinition
<span class='line'>1081</span> 	 * @example
<span class='line'>1082</span> 	 * CKEDITOR.on( 'dialogDefinition', function( evt )
<span class='line'>1083</span> 	 * 	{
<span class='line'>1084</span> 	 * 		var definition = evt.data.definition;
<span class='line'>1085</span> 	 * 		var content = definition.getContents( 'page1' );
<span class='line'>1086</span> 	 * 		...
<span class='line'>1087</span> 	 * 	} );
<span class='line'>1088</span> 	 */</span><span class="WHIT">
<span class='line'>1089</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">definitionObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1090</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1091</span> </span><span class="WHIT">		</span><span class="COMM">// TODO : Check if needed.</span><span class="WHIT">
<span class='line'>1092</span> </span><span class="WHIT">		</span><span class="NAME">this.dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1093</span>
<span class='line'>1094</span> </span><span class="WHIT">		</span><span class="COMM">// Transform the contents entries in contentObjects.</span><span class="WHIT">
<span class='line'>1095</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialogDefinition.contents</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1096</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">contents</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1097</span> </span><span class="WHIT">			</span><span class="NAME">contents</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">contentObject</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1098</span>
<span class='line'>1099</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1100</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1101</span>
<span class='line'>1102</span> </span><span class="WHIT">	</span><span class="NAME">definitionObject.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1103</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends CKEDITOR.dialog.dialogDefinitionObject.prototype */</span><span class="WHIT">
<span class='line'>1104</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1105</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1106</span> 		 * Gets a content definition.
<span class='line'>1107</span> 		 * @param {String} id The id of the content definition.
<span class='line'>1108</span> 		 * @returns {CKEDITOR.dialog.contentDefinition} The content definition
<span class='line'>1109</span> 		 *		matching id.
<span class='line'>1110</span> 		 */</span><span class="WHIT">
<span class='line'>1111</span> </span><span class="WHIT">		</span><span class="NAME">getContents</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1112</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1113</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.contents</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1114</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1115</span>
<span class='line'>1116</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1117</span> 		 * Gets a button definition.
<span class='line'>1118</span> 		 * @param {String} id The id of the button definition.
<span class='line'>1119</span> 		 * @returns {CKEDITOR.dialog.buttonDefinition} The button definition
<span class='line'>1120</span> 		 *		matching id.
<span class='line'>1121</span> 		 */</span><span class="WHIT">
<span class='line'>1122</span> </span><span class="WHIT">		</span><span class="NAME">getButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1123</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1124</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.buttons</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1125</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1126</span>
<span class='line'>1127</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1128</span> 		 * Adds a content definition object under this dialog definition.
<span class='line'>1129</span> 		 * @param {CKEDITOR.dialog.contentDefinition} contentDefinition The
<span class='line'>1130</span> 		 *		content definition.
<span class='line'>1131</span> 		 * @param {String} [nextSiblingId] The id of an existing content
<span class='line'>1132</span> 		 *		definition which the new content definition will be inserted
<span class='line'>1133</span> 		 *		before. Omit if the new content definition is to be inserted as
<span class='line'>1134</span> 		 *		the last item.
<span class='line'>1135</span> 		 * @returns {CKEDITOR.dialog.contentDefinition} The inserted content
<span class='line'>1136</span> 		 *		definition.
<span class='line'>1137</span> 		 */</span><span class="WHIT">
<span class='line'>1138</span> </span><span class="WHIT">		</span><span class="NAME">addContents</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contentDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1139</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1140</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">addById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.contents</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contentDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1141</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1142</span>
<span class='line'>1143</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1144</span> 		 * Adds a button definition object under this dialog definition.
<span class='line'>1145</span> 		 * @param {CKEDITOR.dialog.buttonDefinition} buttonDefinition The
<span class='line'>1146</span> 		 *		button definition.
<span class='line'>1147</span> 		 * @param {String} [nextSiblingId] The id of an existing button
<span class='line'>1148</span> 		 *		definition which the new button definition will be inserted
<span class='line'>1149</span> 		 *		before. Omit if the new button definition is to be inserted as
<span class='line'>1150</span> 		 *		the last item.
<span class='line'>1151</span> 		 * @returns {CKEDITOR.dialog.buttonDefinition} The inserted button
<span class='line'>1152</span> 		 *		definition.
<span class='line'>1153</span> 		 */</span><span class="WHIT">
<span class='line'>1154</span> </span><span class="WHIT">		</span><span class="NAME">addButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">buttonDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1155</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1156</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">addById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.buttons</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">buttonDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1157</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1158</span>
<span class='line'>1159</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1160</span> 		 * Removes a content definition from this dialog definition.
<span class='line'>1161</span> 		 * @param {String} id The id of the content definition to be removed.
<span class='line'>1162</span> 		 * @returns {CKEDITOR.dialog.contentDefinition} The removed content
<span class='line'>1163</span> 		 *		definition.
<span class='line'>1164</span> 		 */</span><span class="WHIT">
<span class='line'>1165</span> </span><span class="WHIT">		</span><span class="NAME">removeContents</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1166</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1167</span> </span><span class="WHIT">			</span><span class="NAME">removeById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.contents</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1168</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1169</span>
<span class='line'>1170</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1171</span> 		 * Removes a button definition from the dialog definition.
<span class='line'>1172</span> 		 * @param {String} id The id of the button definition to be removed.
<span class='line'>1173</span> 		 * @returns {CKEDITOR.dialog.buttonDefinition} The removed button
<span class='line'>1174</span> 		 *		definition.
<span class='line'>1175</span> 		 */</span><span class="WHIT">
<span class='line'>1176</span> </span><span class="WHIT">		</span><span class="NAME">removeButton</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1177</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1178</span> </span><span class="WHIT">			</span><span class="NAME">removeById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.buttons</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1179</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1180</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1181</span>
<span class='line'>1182</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>1183</span> 	 * This class is not really part of the API. It is the template of the
<span class='line'>1184</span> 	 * objects representing content pages inside the
<span class='line'>1185</span> 	 * CKEDITOR.dialog.dialogDefinitionObject.
<span class='line'>1186</span> 	 * @constructor
<span class='line'>1187</span> 	 * @name CKEDITOR.dialog.contentDefinitionObject
<span class='line'>1188</span> 	 * @example
<span class='line'>1189</span> 	 * CKEDITOR.on( 'dialogDefinition', function( evt )
<span class='line'>1190</span> 	 * 	{
<span class='line'>1191</span> 	 * 		var definition = evt.data.definition;
<span class='line'>1192</span> 	 * 		var content = definition.getContents( 'page1' );
<span class='line'>1193</span> 	 *		content.remove( 'textInput1' );
<span class='line'>1194</span> 	 * 		...
<span class='line'>1195</span> 	 * 	} );
<span class='line'>1196</span> 	 */</span><span class="WHIT">
<span class='line'>1197</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">contentObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contentDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1198</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1199</span> </span><span class="WHIT">		</span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1200</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1201</span> </span><span class="WHIT">			</span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT">
<span class='line'>1202</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1203</span>
<span class='line'>1204</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contentDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1205</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1206</span>
<span class='line'>1207</span> </span><span class="WHIT">	</span><span class="NAME">contentObject.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1208</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends CKEDITOR.dialog.contentDefinitionObject.prototype */</span><span class="WHIT">
<span class='line'>1209</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1210</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1211</span> 		 * Gets a UI element definition under the content definition.
<span class='line'>1212</span> 		 * @param {String} id The id of the UI element definition.
<span class='line'>1213</span> 		 * @returns {CKEDITOR.dialog.uiElementDefinition}
<span class='line'>1214</span> 		 */</span><span class="WHIT">
<span class='line'>1215</span> </span><span class="WHIT">		</span><span class="NAME">get</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1216</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1217</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.elements</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'children'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1218</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1219</span>
<span class='line'>1220</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1221</span> 		 * Adds a UI element definition to the content definition.
<span class='line'>1222</span> 		 * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition The
<span class='line'>1223</span> 		 *		UI elemnet definition to be added.
<span class='line'>1224</span> 		 * @param {String} nextSiblingId The id of an existing UI element
<span class='line'>1225</span> 		 *		definition which the new UI element definition will be inserted
<span class='line'>1226</span> 		 *		before. Omit if the new button definition is to be inserted as
<span class='line'>1227</span> 		 *		the last item.
<span class='line'>1228</span> 		 * @returns {CKEDITOR.dialog.uiElementDefinition} The element
<span class='line'>1229</span> 		 *		definition inserted.
<span class='line'>1230</span> 		 */</span><span class="WHIT">
<span class='line'>1231</span> </span><span class="WHIT">		</span><span class="NAME">add</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1232</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1233</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">addById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.elements</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nextSiblingId</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'children'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1234</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1235</span>
<span class='line'>1236</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1237</span> 		 * Removes a UI element definition from the content definition.
<span class='line'>1238</span> 		 * @param {String} id The id of the UI element definition to be
<span class='line'>1239</span> 		 *		removed.
<span class='line'>1240</span> 		 * @returns {CKEDITOR.dialog.uiElementDefinition} The element
<span class='line'>1241</span> 		 *		definition removed.
<span class='line'>1242</span> 		 * @example
<span class='line'>1243</span> 		 */</span><span class="WHIT">
<span class='line'>1244</span> </span><span class="WHIT">		</span><span class="NAME">remove</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1245</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1246</span> </span><span class="WHIT">			</span><span class="NAME">removeById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.elements</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'children'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1247</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1248</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1249</span>
<span class='line'>1250</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">initDragAndDrop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1251</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1252</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1253</span> </span><span class="WHIT">			</span><span class="NAME">abstractDialogCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1254</span> </span><span class="WHIT">			</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.getElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getFirst</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1255</span> </span><span class="WHIT">			</span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog._.editor.config.dialog_magnetDistance</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1256</span> </span><span class="WHIT">			</span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1257</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1258</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialogSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.getSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1259</span> </span><span class="WHIT">					</span><span class="NAME">viewPaneSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getViewPaneSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1260</span> </span><span class="WHIT">					</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1261</span> </span><span class="WHIT">					</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenY</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1262</span> </span><span class="WHIT">					</span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">lastCoords.x</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1263</span> </span><span class="WHIT">					</span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">lastCoords.y</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1264</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1265</span>
<span class='line'>1266</span> </span><span class="WHIT">				</span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1267</span> </span><span class="WHIT">				</span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1268</span> </span><span class="WHIT">				</span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1269</span>
<span class='line'>1270</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1271</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1272</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">viewPaneSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">dialogSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1273</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">viewPaneSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">dialogSize.width</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1274</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1275</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1276</span>
<span class='line'>1277</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1278</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1279</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">viewPaneSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">dialogSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1280</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">viewPaneSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">dialogSize.height</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1281</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1282</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1283</span>
<span class='line'>1284</span> </span><span class="WHIT">				</span><span class="NAME">dialog.move</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">realX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1285</span>
<span class='line'>1286</span> </span><span class="WHIT">				</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1287</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1288</span> </span><span class="WHIT">			</span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1289</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1290</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1291</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1292</span>
<span class='line'>1293</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1294</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1295</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">coverDoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.document</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">frames</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_background_iframe'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1296</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1297</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1298</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1299</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1300</span>
<span class='line'>1301</span> </span><span class="WHIT">		</span><span class="NAME">dialog.parts.title.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousedown'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1302</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1303</span> </span><span class="WHIT">					</span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenY</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1304</span>
<span class='line'>1305</span> </span><span class="WHIT">					</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1306</span> </span><span class="WHIT">					</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1307</span> </span><span class="WHIT">					</span><span class="NAME">abstractDialogCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.getPosition</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1308</span>
<span class='line'>1309</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1310</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1311</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">coverDoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.document</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">frames</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_background_iframe'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1312</span> </span><span class="WHIT">						</span><span class="NAME">coverDoc.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1313</span> </span><span class="WHIT">						</span><span class="NAME">coverDoc.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1314</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1315</span>
<span class='line'>1316</span> </span><span class="WHIT">					</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1317</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1318</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1319</span>
<span class='line'>1320</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">initResizeHandles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1321</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1322</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.definition</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1323</span> </span><span class="WHIT">			</span><span class="NAME">minWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">definition.minWidth</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1324</span> </span><span class="WHIT">			</span><span class="NAME">minHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">definition.minHeight</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1325</span> </span><span class="WHIT">			</span><span class="NAME">resizable</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">definition.resizable</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1326</span> </span><span class="WHIT">			</span><span class="NAME">topSizer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">coords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1327</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1328</span> </span><span class="WHIT">				</span><span class="NAME">coords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1329</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1330</span> </span><span class="WHIT">			</span><span class="NAME">rightSizer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">coords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1331</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1332</span> </span><span class="WHIT">				</span><span class="NAME">coords.x2</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1333</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1334</span> </span><span class="WHIT">			</span><span class="NAME">bottomSizer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">coords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1335</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1336</span> </span><span class="WHIT">				</span><span class="NAME">coords.y2</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1337</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1338</span> </span><span class="WHIT">			</span><span class="NAME">leftSizer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">coords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1339</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1340</span> </span><span class="WHIT">				</span><span class="NAME">coords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1341</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1342</span> </span><span class="WHIT">			</span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1343</span> </span><span class="WHIT">			</span><span class="NAME">abstractDialogCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1344</span> </span><span class="WHIT">			</span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog._.editor.config.magnetDistance</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1345</span> </span><span class="WHIT">			</span><span class="NAME">parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'tl'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'t'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'tr'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'l'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'r'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'bl'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'b'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'br'</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1346</span> </span><span class="WHIT">			</span><span class="NAME">mouseDownHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1347</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1348</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.listenerData.part</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">size</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.getSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1349</span> </span><span class="WHIT">				</span><span class="NAME">abstractDialogCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.getPosition</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1350</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1351</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1352</span> </span><span class="WHIT">						</span><span class="NAME">x2</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">size.width</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1353</span> </span><span class="WHIT">						</span><span class="NAME">y2</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">size.height</span><span class="WHIT">
<span class='line'>1354</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1355</span> </span><span class="WHIT">				</span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenY</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1356</span>
<span class='line'>1357</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">part</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1358</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">part</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1359</span>
<span class='line'>1360</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1361</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1362</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">coverDoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.document</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">frames</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_background_iframe'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1363</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">part</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1364</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">part</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1365</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1366</span>
<span class='line'>1367</span> </span><span class="WHIT">				</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1368</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1369</span> </span><span class="WHIT">			</span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1370</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1371</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1372</span> </span><span class="WHIT">					</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.screenY</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1373</span> </span><span class="WHIT">					</span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">lastCoords.x</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1374</span> </span><span class="WHIT">					</span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">lastCoords.y</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1375</span> </span><span class="WHIT">					</span><span class="NAME">viewPaneSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getViewPaneSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1376</span> </span><span class="WHIT">					</span><span class="NAME">partName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.listenerData.part</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1377</span>
<span class='line'>1378</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'t'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1379</span> </span><span class="WHIT">					</span><span class="NAME">topSizer</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1380</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'l'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1381</span> </span><span class="WHIT">					</span><span class="NAME">leftSizer</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1382</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'b'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1383</span> </span><span class="WHIT">					</span><span class="NAME">bottomSizer</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dy</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1384</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'r'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1385</span> </span><span class="WHIT">					</span><span class="NAME">rightSizer</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dx</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1386</span>
<span class='line'>1387</span> </span><span class="WHIT">				</span><span class="NAME">lastCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1388</span>
<span class='line'>1389</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">realX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realX2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1390</span>
<span class='line'>1391</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1392</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1393</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'l'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">minWidth</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1394</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">minWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1395</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1396</span> </span><span class="WHIT">					</span><span class="NAME">realX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1397</span>
<span class='line'>1398</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1399</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1400</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'t'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">minHeight</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1401</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">minHeight</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1402</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1403</span> </span><span class="WHIT">					</span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1404</span>
<span class='line'>1405</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">viewPaneSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1406</span> </span><span class="WHIT">					</span><span class="NAME">realX2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">viewPaneSize.width</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1407</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'r'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">minWidth</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1408</span> </span><span class="WHIT">					</span><span class="NAME">realX2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">minWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1409</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1410</span> </span><span class="WHIT">					</span><span class="NAME">realX2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.x2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1411</span>
<span class='line'>1412</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">viewPaneSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1413</span> </span><span class="WHIT">					</span><span class="NAME">realY2</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">viewPaneSize.height</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.margins</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1414</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">partName.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'b'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">minHeight</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">magnetDistance</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1415</span> </span><span class="WHIT">					</span><span class="NAME">realY2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">minHeight</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1416</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1417</span> </span><span class="WHIT">					</span><span class="NAME">realY2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">abstractDialogCoords.y2</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1418</span>
<span class='line'>1419</span> </span><span class="WHIT">				</span><span class="NAME">dialog.move</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">realX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1420</span> </span><span class="WHIT">				</span><span class="NAME">dialog.resize</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">realX2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">realX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">realY2</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">realY</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1421</span>
<span class='line'>1422</span> </span><span class="WHIT">				</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1423</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1424</span> </span><span class="WHIT">			</span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1425</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1426</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1427</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.document.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1428</span>
<span class='line'>1429</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1430</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1431</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">coverDoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.document</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">frames</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_background_iframe'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">document</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1432</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseUpHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1433</span> </span><span class="WHIT">					</span><span class="NAME">coverDoc.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseMoveHandler</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1434</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1435</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1436</span>
<span class='line'>1437</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">widthTest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/[lr]/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1438</span> </span><span class="WHIT">			</span><span class="NAME">heightTest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/[tb]/</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1439</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">parts.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1440</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1441</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog.parts</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'_resize'</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1442</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">resizable</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_NONE</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1443</span> </span><span class="WHIT">					</span><span class="NAME">resizable</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_HEIGHT</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">widthTest.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1444</span> </span><span class="WHIT">			  		</span><span class="NAME">resizable</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.DIALOG_RESIZE_WIDTH</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">heightTest.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1445</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1446</span> </span><span class="WHIT">				</span><span class="NAME">element.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1447</span> </span><span class="WHIT">				</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1448</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1449</span> </span><span class="WHIT">			</span><span class="NAME">element.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'mousedown'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mouseDownHandler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">part</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1450</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1451</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1452</span>
<span class='line'>1453</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">resizeCover</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1454</span>
<span class='line'>1455</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">addCover</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1456</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1457</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">win</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1458</span>
<span class='line'>1459</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>1460</span> </span><span class="WHIT">				</span><span class="STRN">'&lt;div style="position: '</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'absolute'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'fixed'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1461</span> </span><span class="WHIT">				</span><span class="STRN">'; z-index: '</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editor.config.baseFloatZIndex</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1462</span> </span><span class="WHIT">				</span><span class="STRN">'; top: 0px; left: 0px; '</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1463</span> </span><span class="WHIT">				</span><span class="STRN">'background-color: '</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">editor.config.dialog_backgroundCoverColor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1464</span> </span><span class="WHIT">				</span><span class="STRN">'" id="cke_dialog_background_cover">'</span><span class="WHIT">
<span class='line'>1465</span> </span><span class="WHIT">			</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1466</span>
<span class='line'>1467</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1468</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1469</span> </span><span class="WHIT">			</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;iframe hidefocus="true" frameborder="0" name="cke_dialog_background_iframe" src="javascript: \'\'" '</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1470</span> </span><span class="WHIT">					</span><span class="STRN">'style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; '</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1471</span> </span><span class="WHIT">					</span><span class="STRN">'progid:DXImageTransform.Microsoft.Alpha(opacity=0)" >&lt;/iframe>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1472</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1473</span>
<span class='line'>1474</span> </span><span class="WHIT">		</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;/div>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1475</span>
<span class='line'>1476</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.element.createFromHtml</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">html.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1477</span>
<span class='line'>1478</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">resizeFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1479</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1480</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">size</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">win.getViewPaneSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1481</span> </span><span class="WHIT">			</span><span class="NAME">element.setStyles</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>1482</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1483</span> </span><span class="WHIT">						</span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">size.width</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1484</span> </span><span class="WHIT">						</span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">size.height</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="WHIT">
<span class='line'>1485</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1486</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1487</span>
<span class='line'>1488</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scrollFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1489</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1490</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">win.getScrollPosition</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1491</span> </span><span class="WHIT">				</span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.currentTop</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1492</span> </span><span class="WHIT">			</span><span class="NAME">element.setStyles</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>1493</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1494</span> </span><span class="WHIT">						</span><span class="NAME">left</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pos.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1495</span> </span><span class="WHIT">						</span><span class="NAME">top</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pos.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="WHIT">
<span class='line'>1496</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1497</span>
<span class='line'>1498</span> </span><span class="WHIT">			</span><span class="KEYW">do</span><span class="WHIT">
<span class='line'>1499</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1500</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialogPos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cursor.getPosition</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1501</span> </span><span class="WHIT">				</span><span class="NAME">cursor.move</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialogPos.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogPos.y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1502</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">while</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cursor._.parentDialog</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1503</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1504</span>
<span class='line'>1505</span> </span><span class="WHIT">		</span><span class="NAME">resizeCover</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">resizeFunc</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1506</span> </span><span class="WHIT">		</span><span class="NAME">win.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'resize'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">resizeFunc</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1507</span> </span><span class="WHIT">		</span><span class="NAME">resizeFunc</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1508</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1509</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1510</span> </span><span class="WHIT">			</span><span class="COMM">// IE BUG: win.$.onscroll assignment doesn't work.. it must be window.onscroll.</span><span class="WHIT">
<span class='line'>1511</span> </span><span class="WHIT">			</span><span class="COMM">// So we need to invent a really funny way to make it work.</span><span class="WHIT">
<span class='line'>1512</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">myScrollHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1513</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1514</span> </span><span class="WHIT">					</span><span class="NAME">scrollFunc</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1515</span> </span><span class="WHIT">					</span><span class="NAME">arguments.callee.prevScrollHandler.apply</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1516</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1517</span> </span><span class="WHIT">			</span><span class="NAME">win.$.setTimeout</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1518</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1519</span> </span><span class="WHIT">					</span><span class="NAME">myScrollHandler.prevScrollHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.onscroll</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1520</span> </span><span class="WHIT">					</span><span class="NAME">window.onscroll</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">myScrollHandler</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1521</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1522</span> </span><span class="WHIT">			</span><span class="NAME">scrollFunc</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1523</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1524</span> </span><span class="WHIT">		</span><span class="NAME">element.setOpacity</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor.config.dialog_backgroundCoverOpacity</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1525</span> </span><span class="WHIT">		</span><span class="NAME">element.appendTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getBody</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1526</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1527</span>
<span class='line'>1528</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">removeCover</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1529</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1530</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_background_cover'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1531</span> </span><span class="WHIT">			</span><span class="NAME">win</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getWindow</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1532</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1533</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1534</span> </span><span class="WHIT">			</span><span class="NAME">element.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1535</span> </span><span class="WHIT">			</span><span class="NAME">win.removeListener</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'resize'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">resizeCover</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1536</span>
<span class='line'>1537</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.env.ie6Compat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1538</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1539</span> </span><span class="WHIT">				</span><span class="NAME">win.$.setTimeout</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1540</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1541</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">prevScrollHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.onscroll</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">window.onscroll.prevScrollHandler</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1542</span> </span><span class="WHIT">						</span><span class="NAME">window.onscroll</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">prevScrollHandler</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1543</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1544</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1545</span> </span><span class="WHIT">			</span><span class="NAME">resizeCover</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1546</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1547</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1548</span>
<span class='line'>1549</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1550</span>
<span class='line'>1551</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">accessKeyDownHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1552</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1553</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ctrl</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.ctrlKey</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">evt.data.$.metaKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1554</span> </span><span class="WHIT">			</span><span class="NAME">alt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.altKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1555</span> </span><span class="WHIT">			</span><span class="NAME">shift</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.shiftKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1556</span> </span><span class="WHIT">			</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">String.fromCharCode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt.data.$.keyCode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1557</span> </span><span class="WHIT">			</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">ctrl</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'CTRL+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">alt</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'ALT+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">shift</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'SHIFT+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1558</span>
<span class='line'>1559</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">keyProcessor.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1560</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1561</span>
<span class='line'>1562</span> </span><span class="WHIT">		</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">keyProcessor</span><span class="PUNC">[</span><span class="NAME">keyProcessor.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1563</span> </span><span class="WHIT">		</span><span class="NAME">keyProcessor.keydown</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">keyProcessor.keydown.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">keyProcessor.uiElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">keyProcessor.dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">keyProcessor.key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1564</span> </span><span class="WHIT">		</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1565</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1566</span>
<span class='line'>1567</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">accessKeyUpHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1568</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1569</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ctrl</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.ctrlKey</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">evt.data.$.metaKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1570</span> </span><span class="WHIT">			</span><span class="NAME">alt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.altKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1571</span> </span><span class="WHIT">			</span><span class="NAME">shift</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">evt.data.$.shiftKey</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1572</span> </span><span class="WHIT">			</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">String.fromCharCode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">evt.data.$.keyCode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1573</span> </span><span class="WHIT">			</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">ctrl</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'CTRL+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">alt</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'ALT+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">shift</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'SHIFT+'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1574</span>
<span class='line'>1575</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">keyProcessor.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1576</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1577</span>
<span class='line'>1578</span> </span><span class="WHIT">		</span><span class="NAME">keyProcessor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">keyProcessor</span><span class="PUNC">[</span><span class="NAME">keyProcessor.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1579</span> </span><span class="WHIT">		</span><span class="NAME">keyProcessor.keyup</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">keyProcessor.keyup.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">keyProcessor.uiElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">keyProcessor.dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">keyProcessor.key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1580</span> </span><span class="WHIT">		</span><span class="NAME">evt.data.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1581</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1582</span>
<span class='line'>1583</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">registerAccessKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">uiElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">downFunc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">upFunc</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1584</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1585</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">procList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1586</span> </span><span class="WHIT">		</span><span class="NAME">procList.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1587</span> </span><span class="WHIT">				</span><span class="NAME">uiElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">uiElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1588</span> </span><span class="WHIT">				</span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1589</span> </span><span class="WHIT">				</span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1590</span> </span><span class="WHIT">				</span><span class="NAME">keyup</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">upFunc</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">uiElement.accessKeyUp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1591</span> </span><span class="WHIT">				</span><span class="NAME">keydown</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">downFunc</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">uiElement.accessKeyDown</span><span class="WHIT">
<span class='line'>1592</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1593</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1594</span>
<span class='line'>1595</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">unregisterAccessKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1596</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1597</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1598</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1599</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">list</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1600</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">list.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">--</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1601</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1602</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">list</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">uiElement</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1603</span> </span><span class="WHIT">					</span><span class="NAME">list.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1604</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1605</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">list.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1606</span> </span><span class="WHIT">				</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">accessKeyProcessors</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1607</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1608</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1609</span>
<span class='line'>1610</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabAccessKeyUp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1611</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1612</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog._.accessKeyMap</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1613</span> </span><span class="WHIT">			</span><span class="NAME">dialog.selectPage</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog._.accessKeyMap</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1614</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1615</span>
<span class='line'>1616</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tabAccessKeyDown</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1617</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1618</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1619</span>
<span class='line'>1620</span> </span><span class="WHIT">	</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1621</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1622</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">decimalRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/^\d+(?:\.\d+)?$/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1623</span> </span><span class="WHIT">			</span><span class="NAME">fixLength</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1624</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1625</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">decimalRegex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'px'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1626</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1627</span>
<span class='line'>1628</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.ui.dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1629</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1630</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>1631</span> 			 * The base class of all dialog UI elements.
<span class='line'>1632</span> 			 * @constructor
<span class='line'>1633</span> 			 * @param {CKEDITOR.dialog} dialog Parent dialog object.
<span class='line'>1634</span> 			 * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition Element
<span class='line'>1635</span> 			 * definition. Accepted fields:
<span class='line'>1636</span> 			 * &lt;ul>
<span class='line'>1637</span> 			 * 	&lt;li>&lt;strong>id&lt;/strong> (Required) The id of the UI element. See {@link
<span class='line'>1638</span> 			 * 	CKEDITOR.dialog#getContentElement}&lt;/li>
<span class='line'>1639</span> 			 * 	&lt;li>&lt;strong>type&lt;/strong> (Required) The type of the UI element. The
<span class='line'>1640</span> 			 * 	value to this field specifies which UI element class will be used to
<span class='line'>1641</span> 			 * 	generate the final widget.&lt;/li>
<span class='line'>1642</span> 			 * 	&lt;li>&lt;strong>title&lt;/strong> (Optional) The popup tooltip for the UI
<span class='line'>1643</span> 			 * 	element.&lt;/li>
<span class='line'>1644</span> 			 * 	&lt;li>&lt;strong>className&lt;/strong> (Optional) Additional CSS class names
<span class='line'>1645</span> 			 * 	to add to the UI element. Separated by space.&lt;/li>
<span class='line'>1646</span> 			 * 	&lt;li>&lt;strong>style&lt;/strong> (Optional) Additional CSS inline styles
<span class='line'>1647</span> 			 * 	to add to the UI element. A semicolon (;) is required after the last
<span class='line'>1648</span> 			 * 	style declaration.&lt;/li>
<span class='line'>1649</span> 			 * 	&lt;li>&lt;strong>accessKey&lt;/strong> (Optional) The alphanumeric access key
<span class='line'>1650</span> 			 * 	for this element. Access keys are automatically prefixed by CTRL.&lt;/li>
<span class='line'>1651</span> 			 * 	&lt;li>&lt;strong>on*&lt;/strong> (Optional) Any UI element definition field that
<span class='line'>1652</span> 			 * 	starts with &lt;em>on&lt;/em> followed immediately by a capital letter and
<span class='line'>1653</span> 			 * 	probably more letters is an event handler. Event handlers may be further
<span class='line'>1654</span> 			 * 	divided into registered event handlers and DOM event handlers. Please
<span class='line'>1655</span> 			 * 	refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and
<span class='line'>1656</span> 			 * 	{@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more
<span class='line'>1657</span> 			 * 	information.&lt;/li>
<span class='line'>1658</span> 			 * &lt;/ul>
<span class='line'>1659</span> 			 * @param {Array} htmlList
<span class='line'>1660</span> 			 * List of HTML code to be added to the dialog's content area.
<span class='line'>1661</span> 			 * @param {Function|String} nodeNameArg
<span class='line'>1662</span> 			 * A function returning a string, or a simple string for the node name for
<span class='line'>1663</span> 			 * the root DOM node. Default is 'div'.
<span class='line'>1664</span> 			 * @param {Function|Object} stylesArg
<span class='line'>1665</span> 			 * A function returning an object, or a simple object for CSS styles applied
<span class='line'>1666</span> 			 * to the DOM node. Default is empty object.
<span class='line'>1667</span> 			 * @param {Function|Object} attributesArg
<span class='line'>1668</span> 			 * A fucntion returning an object, or a simple object for attributes applied
<span class='line'>1669</span> 			 * to the DOM node. Default is empty object.
<span class='line'>1670</span> 			 * @param {Function|String} contentsArg
<span class='line'>1671</span> 			 * A function returning a string, or a simple string for the HTML code inside
<span class='line'>1672</span> 			 * the root DOM node. Default is empty string.
<span class='line'>1673</span> 			 * @example
<span class='line'>1674</span> 			 */</span><span class="WHIT">
<span class='line'>1675</span> </span><span class="WHIT">			</span><span class="NAME">uiElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nodeNameArg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">stylesArg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attributesArg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">contentsArg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1676</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1677</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1678</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1679</span>
<span class='line'>1680</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nodeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nodeNameArg.call</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">nodeNameArg</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nodeNameArg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1681</span> </span><span class="WHIT">					</span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'&lt;'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nodeName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1682</span> </span><span class="WHIT">					</span><span class="NAME">styles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">stylesArg</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">stylesArg.call</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">stylesArg</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">stylesArg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1683</span> </span><span class="WHIT">					</span><span class="NAME">attributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributesArg</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">attributesArg.call</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">attributesArg</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">attributesArg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1684</span> </span><span class="WHIT">					</span><span class="NAME">innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">contentsArg</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">contentsArg.call</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">contentsArg</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">contentsArg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1685</span> </span><span class="WHIT">					</span><span class="NAME">domId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.domId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attributes.id</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.getNextNumber</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'_uiElement'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1686</span> </span><span class="WHIT">					</span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition.id</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1687</span> </span><span class="WHIT">					</span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1688</span>
<span class='line'>1689</span> </span><span class="WHIT">				</span><span class="COMM">// Set the id, a unique id is required for getElement() to work.</span><span class="WHIT">
<span class='line'>1690</span> </span><span class="WHIT">				</span><span class="NAME">attributes.id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">domId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1691</span>
<span class='line'>1692</span> </span><span class="WHIT">				</span><span class="COMM">// Set the type and definition CSS class names.</span><span class="WHIT">
<span class='line'>1693</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">classes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1694</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.type</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1695</span> </span><span class="WHIT">					</span><span class="NAME">classes</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_ui_'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">elementDefinition.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1696</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.className</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1697</span> </span><span class="WHIT">					</span><span class="NAME">classes</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">elementDefinition.className</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1698</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">attributeClasses</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="STRN">'class'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="STRN">'class'</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="STRN">'class'</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1699</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">attributeClasses.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1700</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1701</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributeClasses</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1702</span> </span><span class="WHIT">						</span><span class="NAME">classes</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">attributeClasses</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1703</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1704</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">finalClasses</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1705</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">classes</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1706</span> </span><span class="WHIT">					</span><span class="NAME">finalClasses.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1707</span> </span><span class="WHIT">				</span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="STRN">'class'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">finalClasses.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1708</span>
<span class='line'>1709</span> </span><span class="WHIT">				</span><span class="COMM">// Set the popup tooltop.</span><span class="WHIT">
<span class='line'>1710</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.title</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1711</span> </span><span class="WHIT">					</span><span class="NAME">attributes.title</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition.title</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1712</span>
<span class='line'>1713</span> </span><span class="WHIT">				</span><span class="COMM">// Write the inline CSS styles.</span><span class="WHIT">
<span class='line'>1714</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">styleStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.style</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">';'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1715</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">styles</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1716</span> </span><span class="WHIT">					</span><span class="NAME">styleStr.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">':'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">styles</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1717</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">styleStr.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">--</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1718</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1719</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">styleStr</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1720</span> </span><span class="WHIT">						</span><span class="NAME">styleStr.splice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1721</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1722</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">styleStr.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1723</span> </span><span class="WHIT">					</span><span class="NAME">attributes.style</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributes.style</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">styleStr.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'; '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1724</span>
<span class='line'>1725</span> </span><span class="WHIT">				</span><span class="COMM">// Write the attributes.</span><span class="WHIT">
<span class='line'>1726</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1727</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'="'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.htmlEncode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">attributes</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1728</span>
<span class='line'>1729</span> </span><span class="WHIT">				</span><span class="COMM">// Write the content HTML.</span><span class="WHIT">
<span class='line'>1730</span> </span><span class="WHIT">				</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'>'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">innerHTML</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'&lt;/'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nodeName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1731</span>
<span class='line'>1732</span> </span><span class="WHIT">				</span><span class="COMM">// Add contents to the parent HTML array.</span><span class="WHIT">
<span class='line'>1733</span> </span><span class="WHIT">				</span><span class="NAME">htmlList.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">html.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1734</span>
<span class='line'>1735</span> </span><span class="WHIT">				</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1736</span>
<span class='line'>1737</span> </span><span class="WHIT">				</span><span class="COMM">// Override isChanged if it is defined in element definition.</span><span class="WHIT">
<span class='line'>1738</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.isChanged</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'boolean'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1739</span> </span><span class="WHIT">					</span><span class="NAME">this.isChanged</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">elementDefinition.isChanged</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1740</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.isChanged</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1741</span> </span><span class="WHIT">					</span><span class="NAME">this.isChanged</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition.isChanged</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1742</span>
<span class='line'>1743</span> </span><span class="WHIT">				</span><span class="COMM">// Add events.</span><span class="WHIT">
<span class='line'>1744</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.event.implementOn</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1745</span>
<span class='line'>1746</span> </span><span class="WHIT">				</span><span class="NAME">this.registerEvents</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1747</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.accessKeyUp</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.accessKeyDown</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.accessKey</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1748</span> </span><span class="WHIT">					</span><span class="NAME">registerAccessKey</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'CTRL+'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">elementDefinition.accessKey</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1749</span>
<span class='line'>1750</span> </span><span class="WHIT">				</span><span class="COMM">// Completes this object with everything we have in the</span><span class="WHIT">
<span class='line'>1751</span> </span><span class="WHIT">				</span><span class="COMM">// definition.</span><span class="WHIT">
<span class='line'>1752</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1753</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1754</span>
<span class='line'>1755</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>1756</span> 			 * Horizontal layout box for dialog UI elements, auto-expends to available width of container.
<span class='line'>1757</span> 			 * @constructor
<span class='line'>1758</span> 			 * @extends CKEDITOR.ui.dialog.uiElement
<span class='line'>1759</span> 			 * @param {CKEDITOR.dialog} dialog
<span class='line'>1760</span> 			 * Parent dialog object.
<span class='line'>1761</span> 			 * @param {Array} childObjList
<span class='line'>1762</span> 			 * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this
<span class='line'>1763</span> 			 * container.
<span class='line'>1764</span> 			 * @param {Array} childHtmlList
<span class='line'>1765</span> 			 * Array of HTML code that correspond to the HTML output of all the
<span class='line'>1766</span> 			 * objects in childObjList.
<span class='line'>1767</span> 			 * @param {Array} htmlList
<span class='line'>1768</span> 			 * Array of HTML code that this element will output to.
<span class='line'>1769</span> 			 * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition
<span class='line'>1770</span> 			 * The element definition. Accepted fields:
<span class='line'>1771</span> 			 * &lt;ul>
<span class='line'>1772</span> 			 * 	&lt;li>&lt;strong>widths&lt;/strong> (Optional) The widths of child cells.&lt;/li>
<span class='line'>1773</span> 			 * 	&lt;li>&lt;strong>height&lt;/strong> (Optional) The height of the layout.&lt;/li>
<span class='line'>1774</span> 			 * 	&lt;li>&lt;strong>padding&lt;/strong> (Optional) The padding width inside child
<span class='line'>1775</span> 			 * 	 cells.&lt;/li>
<span class='line'>1776</span> 			 * 	&lt;li>&lt;strong>align&lt;/strong> (Optional) The alignment of the whole layout
<span class='line'>1777</span> 			 * 	&lt;/li>
<span class='line'>1778</span> 			 * &lt;/ul>
<span class='line'>1779</span> 			 * @example
<span class='line'>1780</span> 			 */</span><span class="WHIT">
<span class='line'>1781</span> </span><span class="WHIT">			</span><span class="NAME">hbox</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childObjList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1782</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1783</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1784</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1785</span>
<span class='line'>1786</span> </span><span class="WHIT">				</span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1787</span>
<span class='line'>1788</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">childObjList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1789</span> </span><span class="WHIT">					</span><span class="NAME">widths</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.widths</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1790</span> </span><span class="WHIT">					</span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.height</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1791</span> </span><span class="WHIT">					</span><span class="NAME">styles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1792</span> </span><span class="WHIT">					</span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1793</span> </span><span class="WHIT">				</span><span class="COMM">/** @ignore */</span><span class="WHIT">
<span class='line'>1794</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1795</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1796</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'&lt;tbody>&lt;tr class="cke_dialog_ui_hbox">'</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1797</span> </span><span class="WHIT">					</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">childHtmlList.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1798</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1799</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_ui_hbox_child'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1800</span> </span><span class="WHIT">							</span><span class="NAME">styles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1801</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1802</span> </span><span class="WHIT">							</span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_ui_hbox_first'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1803</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">childHtmlList.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1804</span> </span><span class="WHIT">							</span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_ui_hbox_last'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1805</span> </span><span class="WHIT">						</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;td class="'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1806</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widths</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1807</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1808</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widths</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1809</span> </span><span class="WHIT">								</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'width:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">widths</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1810</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1811</span> </span><span class="WHIT">						</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>1812</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'width:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">childHtmlList.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'%'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1813</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1814</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'height:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1815</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.padding</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1816</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'padding:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.padding</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1817</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">styles.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1818</span> </span><span class="WHIT">							</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'style="'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">styles.join</span><span class="PUNC">(</span><span class="STRN">'; '</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1819</span> </span><span class="WHIT">						</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'>'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtmlList</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'&lt;/td>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1820</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1821</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;/tr>&lt;/tbody>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1822</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">html.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1823</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1824</span>
<span class='line'>1825</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.ui.dialog.uiElement.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'hbox'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'table'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">styles</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1826</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">align</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.align</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>1827</span> </span><span class="WHIT">							</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog.getParentEditor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">lang.dir</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'ltr'</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'right'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">innerHTML</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1828</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1829</span>
<span class='line'>1830</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>1831</span> 			 * Vertical layout box for dialog UI elements.
<span class='line'>1832</span> 			 * @constructor
<span class='line'>1833</span> 			 * @extends CKEDITOR.ui.dialog.hbox
<span class='line'>1834</span> 			 * @param {CKEDITOR.dialog} dialog
<span class='line'>1835</span> 			 * Parent dialog object.
<span class='line'>1836</span> 			 * @param {Array} childObjList
<span class='line'>1837</span> 			 * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this
<span class='line'>1838</span> 			 * container.
<span class='line'>1839</span> 			 * @param {Array} childHtmlList
<span class='line'>1840</span> 			 * Array of HTML code that correspond to the HTML output of all the
<span class='line'>1841</span> 			 * objects in childObjList.
<span class='line'>1842</span> 			 * @param {Array} htmlList
<span class='line'>1843</span> 			 * Array of HTML code that this element will output to.
<span class='line'>1844</span> 			 * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition
<span class='line'>1845</span> 			 * The element definition. Accepted fields:
<span class='line'>1846</span> 			 * &lt;ul>
<span class='line'>1847</span> 			 * 	&lt;li>&lt;strong>width&lt;/strong> (Optional) The width of the layout.&lt;/li>
<span class='line'>1848</span> 			 * 	&lt;li>&lt;strong>heights&lt;/strong> (Optional) The heights of individual cells.
<span class='line'>1849</span> 			 * 	&lt;/li>
<span class='line'>1850</span> 			 * 	&lt;li>&lt;strong>align&lt;/strong> (Optional) The alignment of the layout.&lt;/li>
<span class='line'>1851</span> 			 * 	&lt;li>&lt;strong>padding&lt;/strong> (Optional) The padding width inside child
<span class='line'>1852</span> 			 * 	cells.&lt;/li>
<span class='line'>1853</span> 			 * 	&lt;li>&lt;strong>expand&lt;/strong> (Optional) Whether the layout should expand
<span class='line'>1854</span> 			 * 	vertically to fill its container.&lt;/li>
<span class='line'>1855</span> 			 * &lt;/ul>
<span class='line'>1856</span> 			 * @example
<span class='line'>1857</span> 			 */</span><span class="WHIT">
<span class='line'>1858</span> </span><span class="WHIT">			</span><span class="NAME">vbox</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childObjList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1859</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1860</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1861</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1862</span>
<span class='line'>1863</span> </span><span class="WHIT">				</span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1864</span>
<span class='line'>1865</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">childObjList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1866</span> </span><span class="WHIT">					</span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.width</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1867</span> </span><span class="WHIT">					</span><span class="NAME">heights</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.heights</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1868</span> </span><span class="WHIT">				</span><span class="COMM">/** @ignore */</span><span class="WHIT">
<span class='line'>1869</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1870</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1871</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'&lt;table cellspacing="0" border="0" '</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1872</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'style="'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1873</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.expand</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1874</span> </span><span class="WHIT">						</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'height:100%;'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1875</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'width:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'100%'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">';'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1876</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'"'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1877</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'align="'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.htmlEncode</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>1878</span> </span><span class="WHIT">						</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.align</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog.getParentEditor</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">lang.dir</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'ltr'</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'right'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1879</span>
<span class='line'>1880</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'>&lt;tbody>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1881</span> </span><span class="WHIT">					</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">childHtmlList.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1882</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1883</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">styles</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1884</span> </span><span class="WHIT">						</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;tr>&lt;td '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1885</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1886</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'width:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'100%'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1887</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">heights</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1888</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'height:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">heights</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1889</span> </span><span class="WHIT">						</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.expand</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1890</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'height:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">childHtmlList.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'%'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1891</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">elementDefinition.padding</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1892</span> </span><span class="WHIT">							</span><span class="NAME">styles.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'padding:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fixLength</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">elementDefinition.padding</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1893</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">styles.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1894</span> </span><span class="WHIT">							</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'style="'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">styles.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'; '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'" '</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1895</span> </span><span class="WHIT">						</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">' class="cke_dialog_ui_vbox_child">'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtmlList</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'&lt;/td>&lt;/tr>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1896</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1897</span> </span><span class="WHIT">					</span><span class="NAME">html.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'&lt;/tbody>&lt;/table>'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1898</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">html.join</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1899</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1900</span> </span><span class="WHIT">				</span><span class="NAME">CKEDITOR.ui.dialog.uiElement.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'vbox'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">innerHTML</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1901</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1902</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1903</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1904</span>
<span class='line'>1905</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.ui.dialog.uiElement.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>1906</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1907</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1908</span> 		 * Gets the root DOM element of this dialog UI object.
<span class='line'>1909</span> 		 * @returns {CKEDITOR.dom.element} Root DOM element of UI object.
<span class='line'>1910</span> 		 * @example
<span class='line'>1911</span> 		 * uiElement.getElement().hide();
<span class='line'>1912</span> 		 */</span><span class="WHIT">
<span class='line'>1913</span> </span><span class="WHIT">		</span><span class="NAME">getElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1914</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1915</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getById</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.domId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1916</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1917</span>
<span class='line'>1918</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1919</span> 		 * Gets the DOM element that the user inputs values.
<span class='line'>1920</span> 		 * This function is used by setValue(), getValue() and focus(). It should
<span class='line'>1921</span> 		 * be overrided in child classes where the input element isn't the root
<span class='line'>1922</span> 		 * element.
<span class='line'>1923</span> 		 * @returns {CKEDITOR.dom.element} The element where the user input values.
<span class='line'>1924</span> 		 * @example
<span class='line'>1925</span> 		 * var rawValue = textInput.getInputElement().$.value;
<span class='line'>1926</span> 		 */</span><span class="WHIT">
<span class='line'>1927</span> </span><span class="WHIT">		</span><span class="NAME">getInputElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1928</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1929</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1930</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1931</span>
<span class='line'>1932</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1933</span> 		 * Gets the parent dialog object containing this UI element.
<span class='line'>1934</span> 		 * @returns {CKEDITOR.dialog} Parent dialog object.
<span class='line'>1935</span> 		 * @example
<span class='line'>1936</span> 		 * var dialog = uiElement.getDialog();
<span class='line'>1937</span> 		 */</span><span class="WHIT">
<span class='line'>1938</span> </span><span class="WHIT">		</span><span class="NAME">getDialog</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1939</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1940</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1941</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1942</span>
<span class='line'>1943</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1944</span> 		 * Sets the value of this dialog UI object.
<span class='line'>1945</span> 		 * @param {Object} value The new value.
<span class='line'>1946</span> 		 * @returns {CKEDITOR.dialog.uiElement} The current UI element.
<span class='line'>1947</span> 		 * @example
<span class='line'>1948</span> 		 * uiElement.setValue( 'Dingo' );
<span class='line'>1949</span> 		 */</span><span class="WHIT">
<span class='line'>1950</span> </span><span class="WHIT">		</span><span class="NAME">setValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1951</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1952</span> </span><span class="WHIT">			</span><span class="NAME">this.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setValue</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1953</span> </span><span class="WHIT">			</span><span class="NAME">this.fire</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'change'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1954</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1955</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1956</span>
<span class='line'>1957</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1958</span> 		 * Gets the current value of this dialog UI object.
<span class='line'>1959</span> 		 * @returns {Object} The current value.
<span class='line'>1960</span> 		 * @example
<span class='line'>1961</span> 		 * var myValue = uiElement.getValue();
<span class='line'>1962</span> 		 */</span><span class="WHIT">
<span class='line'>1963</span> </span><span class="WHIT">		</span><span class="NAME">getValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1964</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1965</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1966</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1967</span>
<span class='line'>1968</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1969</span> 		 * Tells whether the UI object's value has changed.
<span class='line'>1970</span> 		 * @returns {Boolean} true if changed, false if not changed.
<span class='line'>1971</span> 		 * @example
<span class='line'>1972</span> 		 * if ( uiElement.isChanged() )
<span class='line'>1973</span> 		 * &nbsp;&nbsp;confirm( 'Value changed! Continue?' );
<span class='line'>1974</span> 		 */</span><span class="WHIT">
<span class='line'>1975</span> </span><span class="WHIT">		</span><span class="NAME">isChanged</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1976</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1977</span> </span><span class="WHIT">			</span><span class="COMM">// Override in input classes.</span><span class="WHIT">
<span class='line'>1978</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1979</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1980</span>
<span class='line'>1981</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>1982</span> 		 * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.
<span class='line'>1983</span> 		 * @returns {CKEDITOR.dialog.uiElement} The current UI element.
<span class='line'>1984</span> 		 * @example
<span class='line'>1985</span> 		 * focus : function()
<span class='line'>1986</span> 		 * {
<span class='line'>1987</span> 		 * 		this.selectParentTab();
<span class='line'>1988</span> 		 * 		// do something else.
<span class='line'>1989</span> 		 * }
<span class='line'>1990</span> 		 */</span><span class="WHIT">
<span class='line'>1991</span> </span><span class="WHIT">		</span><span class="NAME">selectParentTab</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1992</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1993</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1994</span> </span><span class="WHIT">				</span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">element</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>1995</span> </span><span class="WHIT">				</span><span class="NAME">tabId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1996</span> </span><span class="WHIT">			</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cursor.getParent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">cursor.$.className.search</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_dialog_page_contents'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1997</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">/*jsl:pass*/</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1998</span>
<span class='line'>1999</span> </span><span class="WHIT">			</span><span class="NAME">tabId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cursor.getAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'name'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2000</span>
<span class='line'>2001</span> </span><span class="WHIT">			</span><span class="NAME">this._.dialog.selectPage</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tabId</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2002</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2003</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2004</span>
<span class='line'>2005</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2006</span> 		 * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.
<span class='line'>2007</span> 		 * @returns {CKEDITOR.dialog.uiElement} The current UI element.
<span class='line'>2008</span> 		 * @example
<span class='line'>2009</span> 		 * uiElement.focus();
<span class='line'>2010</span> 		 */</span><span class="WHIT">
<span class='line'>2011</span> </span><span class="WHIT">		</span><span class="NAME">focus</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2012</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2013</span> </span><span class="WHIT">			</span><span class="NAME">this.selectParentTab</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2014</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2015</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2016</span>
<span class='line'>2017</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2018</span> 		 * Registers the on* event handlers defined in the element definition.
<span class='line'>2019</span> 		 * The default behavior of this function is:
<span class='line'>2020</span> 		 * &lt;ol>
<span class='line'>2021</span> 		 *  &lt;li>
<span class='line'>2022</span> 		 *  	If the on* event is defined in the class's eventProcesors list,
<span class='line'>2023</span> 		 *  	then the registration is delegated to the corresponding function
<span class='line'>2024</span> 		 *  	in the eventProcessors list.
<span class='line'>2025</span> 		 *  &lt;/li>
<span class='line'>2026</span> 		 *  &lt;li>
<span class='line'>2027</span> 		 *  	If the on* event is not defined in the eventProcessors list, then
<span class='line'>2028</span> 		 *  	register the event handler under the corresponding DOM event of
<span class='line'>2029</span> 		 *  	the UI element's input DOM element (as defined by the return value
<span class='line'>2030</span> 		 *  	of {@link CKEDITOR.ui.dialog.uiElement#getInputElement}).
<span class='line'>2031</span> 		 *  &lt;/li>
<span class='line'>2032</span> 		 * &lt;/ol>
<span class='line'>2033</span> 		 * This function is only called at UI element instantiation, but can
<span class='line'>2034</span> 		 * be overridded in child classes if they require more flexibility.
<span class='line'>2035</span> 		 * @param {CKEDITOR.dialog.uiElementDefinition} definition The UI element
<span class='line'>2036</span> 		 * definition.
<span class='line'>2037</span> 		 * @returns {CKEDITOR.dialog.uiElement} The current UI element.
<span class='line'>2038</span> 		 * @example
<span class='line'>2039</span> 		 */</span><span class="WHIT">
<span class='line'>2040</span> </span><span class="WHIT">		</span><span class="NAME">registerEvents</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2041</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2042</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/^on([A-Z]\w+)/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2043</span> </span><span class="WHIT">				</span><span class="NAME">match</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2044</span>
<span class='line'>2045</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">registerDomEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">uiElement</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">eventName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2046</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2047</span> </span><span class="WHIT">				</span><span class="NAME">dialog.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'load'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2048</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2049</span> </span><span class="WHIT">					</span><span class="NAME">uiElement.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">eventName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">uiElement</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2050</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2051</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2052</span>
<span class='line'>2053</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2054</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2055</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">match</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i.match</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2056</span> </span><span class="WHIT">					</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2057</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.eventProcessors</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2058</span> </span><span class="WHIT">					</span><span class="NAME">this.eventProcessors</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._.dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2059</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>2060</span> </span><span class="WHIT">					</span><span class="NAME">registerDomEvent</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._.dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">match</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2061</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2062</span>
<span class='line'>2063</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2064</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2065</span>
<span class='line'>2066</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2067</span> 		 * The event processor list used by
<span class='line'>2068</span> 		 * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element
<span class='line'>2069</span> 		 * instantiation. The default list defines three on* events:
<span class='line'>2070</span> 		 * &lt;ol>
<span class='line'>2071</span> 		 *  &lt;li>onLoad - Called when the element's parent dialog opens for the
<span class='line'>2072</span> 		 *  first time&lt;/li>
<span class='line'>2073</span> 		 *  &lt;li>onShow - Called whenever the element's parent dialog opens.&lt;/li>
<span class='line'>2074</span> 		 *  &lt;li>onHide - Called whenever the element's parent dialog closes.&lt;/li>
<span class='line'>2075</span> 		 * &lt;/ol>
<span class='line'>2076</span> 		 * @field
<span class='line'>2077</span> 		 * @type Object
<span class='line'>2078</span> 		 * @example
<span class='line'>2079</span> 		 * // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick
<span class='line'>2080</span> 		 * // handlers in the UI element's definitions.
<span class='line'>2081</span> 		 * CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {},
<span class='line'>2082</span> 		 * &nbsp;&nbsp;CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
<span class='line'>2083</span> 		 * &nbsp;&nbsp;{ onClick : function( dialog, func ) { this.on( 'click', func ); } },
<span class='line'>2084</span> 		 * &nbsp;&nbsp;true );
<span class='line'>2085</span> 		 */</span><span class="WHIT">
<span class='line'>2086</span> </span><span class="WHIT">		</span><span class="NAME">eventProcessors</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>2087</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2088</span> </span><span class="WHIT">			</span><span class="NAME">onLoad</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2089</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2090</span> </span><span class="WHIT">				</span><span class="NAME">dialog.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'load'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2091</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2092</span>
<span class='line'>2093</span> </span><span class="WHIT">			</span><span class="NAME">onShow</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2094</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2095</span> </span><span class="WHIT">				</span><span class="NAME">dialog.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'show'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2096</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2097</span>
<span class='line'>2098</span> </span><span class="WHIT">			</span><span class="NAME">onHide</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2099</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2100</span> </span><span class="WHIT">				</span><span class="NAME">dialog.on</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'hide'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2101</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2102</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2103</span>
<span class='line'>2104</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2105</span> 		 * The default handler for a UI element's access key down event, which
<span class='line'>2106</span> 		 * tries to put focus to the UI element.&lt;br />
<span class='line'>2107</span> 		 * Can be overridded in child classes for more sophisticaed behavior.
<span class='line'>2108</span> 		 * @param {CKEDITOR.dialog} dialog The parent dialog object.
<span class='line'>2109</span> 		 * @param {String} key The key combination pressed. Since access keys
<span class='line'>2110</span> 		 * are defined to always include the CTRL key, its value should always
<span class='line'>2111</span> 		 * include a 'CTRL+' prefix.
<span class='line'>2112</span> 		 * @example
<span class='line'>2113</span> 		 */</span><span class="WHIT">
<span class='line'>2114</span> </span><span class="WHIT">		</span><span class="NAME">accessKeyDown</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2115</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2116</span> </span><span class="WHIT">			</span><span class="NAME">this.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2117</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2118</span>
<span class='line'>2119</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2120</span> 		 * The default handler for a UI element's access key up event, which
<span class='line'>2121</span> 		 * does nothing.&lt;br />
<span class='line'>2122</span> 		 * Can be overridded in child classes for more sophisticated behavior.
<span class='line'>2123</span> 		 * @param {CKEDITOR.dialog} dialog The parent dialog object.
<span class='line'>2124</span> 		 * @param {String} key The key combination pressed. Since access keys
<span class='line'>2125</span> 		 * are defined to always include the CTRL key, its value should always
<span class='line'>2126</span> 		 * include a 'CTRL+' prefix.
<span class='line'>2127</span> 		 * @example
<span class='line'>2128</span> 		 */</span><span class="WHIT">
<span class='line'>2129</span> </span><span class="WHIT">		</span><span class="NAME">accessKeyUp</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2130</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2131</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2132</span>
<span class='line'>2133</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2134</span> 		 * Disables a UI element.
<span class='line'>2135</span> 		 * @example
<span class='line'>2136</span> 		 */</span><span class="WHIT">
<span class='line'>2137</span> </span><span class="WHIT">		</span><span class="NAME">disable</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2138</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2139</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2140</span> </span><span class="WHIT">			</span><span class="NAME">element.setAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'disabled'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'true'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2141</span> </span><span class="WHIT">			</span><span class="NAME">element.addClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_disabled'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2142</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2143</span>
<span class='line'>2144</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2145</span> 		 * Enables a UI element.
<span class='line'>2146</span> 		 * @example
<span class='line'>2147</span> 		 */</span><span class="WHIT">
<span class='line'>2148</span> </span><span class="WHIT">		</span><span class="NAME">enable</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2149</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2150</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getInputElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2151</span> </span><span class="WHIT">			</span><span class="NAME">element.removeAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'disabled'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2152</span> </span><span class="WHIT">			</span><span class="NAME">element.removeClass</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cke_disabled'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2153</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2154</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2155</span>
<span class='line'>2156</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.ui.dialog.hbox.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.ui.dialog.uiElement</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2157</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2158</span> 		 * @lends CKEDITOR.ui.dialog.hbox.prototype
<span class='line'>2159</span> 		 */</span><span class="WHIT">
<span class='line'>2160</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2161</span> </span><span class="WHIT">			</span><span class="COMM">/**
<span class='line'>2162</span> 			 * Gets a child UI element inside this container.
<span class='line'>2163</span> 			 * @param {Array|Number} indices An array or a single number to indicate the child's
<span class='line'>2164</span> 			 * position in the container's descendant tree. Omit to get all the children in an array.
<span class='line'>2165</span> 			 * @returns {Array|CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container
<span class='line'>2166</span> 			 * if no argument given, or the specified UI element if indices is given.
<span class='line'>2167</span> 			 * @example
<span class='line'>2168</span> 			 * var checkbox = hbox.getChild( [0,1] );
<span class='line'>2169</span> 			 * checkbox.setValue( true );
<span class='line'>2170</span> 			 */</span><span class="WHIT">
<span class='line'>2171</span> </span><span class="WHIT">			</span><span class="NAME">getChild</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2172</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2173</span> </span><span class="WHIT">				</span><span class="COMM">// If no arguments, return a clone of the children array.</span><span class="WHIT">
<span class='line'>2174</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2175</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.children.concat</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2176</span>
<span class='line'>2177</span> </span><span class="WHIT">				</span><span class="COMM">// If indices isn't array, make it one.</span><span class="WHIT">
<span class='line'>2178</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">indices.splice</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2179</span> </span><span class="WHIT">					</span><span class="NAME">indices</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2180</span>
<span class='line'>2181</span> </span><span class="WHIT">				</span><span class="COMM">// Retrieve the child element according to tree position.</span><span class="WHIT">
<span class='line'>2182</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">indices.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2183</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._.children</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2184</span> </span><span class="WHIT">				</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>2185</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.children</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this._.children</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getChild</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
<span class='line'>2186</span> </span><span class="WHIT">						</span><span class="NAME">this._.children</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">indices</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getChild</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">indices.slice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">indices.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>2187</span> </span><span class="WHIT">						</span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2188</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2189</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2190</span>
<span class='line'>2191</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.ui.dialog.vbox.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.ui.dialog.hbox</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2192</span>
<span class='line'>2193</span>
<span class='line'>2194</span>
<span class='line'>2195</span> </span><span class="WHIT">	</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2196</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2197</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">commonBuilder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2198</span> </span><span class="WHIT">			</span><span class="NAME">build</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">output</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2199</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2200</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elementDefinition.children</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2201</span> </span><span class="WHIT">					</span><span class="NAME">child</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2202</span> </span><span class="WHIT">					</span><span class="NAME">childHtmlList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2203</span> </span><span class="WHIT">					</span><span class="NAME">childObjList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2204</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">children.length</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">children</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2205</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2206</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">childHtml</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2207</span> </span><span class="WHIT">					</span><span class="NAME">childHtmlList.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">childHtml</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2208</span> </span><span class="WHIT">					</span><span class="NAME">childObjList.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.uiElementBuilders</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">child.type</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">build</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">child</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtml</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2209</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2210</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.ui.dialog</span><span class="PUNC">[</span><span class="NAME">elementDefinition.type</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childObjList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childHtmlList</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">output</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elementDefinition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2211</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2212</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2213</span>
<span class='line'>2214</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.dialog.addUIElement</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'hbox'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">commonBuilder</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2215</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.dialog.addUIElement</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'vbox'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">commonBuilder</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2216</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2217</span>
<span class='line'>2218</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>2219</span> 	 * Generic dialog command. It opens a specific dialog when executed.
<span class='line'>2220</span> 	 * @constructor
<span class='line'>2221</span> 	 * @augments CKEDITOR.commandDefinition
<span class='line'>2222</span> 	 * @param {string} dialogName The name of the dialog to open when executing
<span class='line'>2223</span> 	 *		this command.
<span class='line'>2224</span> 	 * @example
<span class='line'>2225</span> 	 * // Register the "link" command, which opens the "link" dialog.
<span class='line'>2226</span> 	 * editor.addCommand( 'link', &lt;b>new CKEDITOR.dialogCommand( 'link' )&lt;/b> );
<span class='line'>2227</span> 	 */</span><span class="WHIT">
<span class='line'>2228</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dialogCommand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2229</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2230</span> </span><span class="WHIT">		</span><span class="NAME">this.dialogName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2231</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2232</span>
<span class='line'>2233</span> </span><span class="WHIT">	</span><span class="NAME">CKEDITOR.dialogCommand.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>2234</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2235</span> </span><span class="WHIT">		</span><span class="COMM">/** @ignore */</span><span class="WHIT">
<span class='line'>2236</span> </span><span class="WHIT">		</span><span class="NAME">exec</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2237</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2238</span> </span><span class="WHIT">			</span><span class="NAME">editor.openDialog</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2239</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2240</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2241</span>
<span class='line'>2242</span> </span><span class="WHIT">	</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2243</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2244</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">notEmptyRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/^([a]|[^a])+$/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2245</span> </span><span class="WHIT">			</span><span class="NAME">integerRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/^\d*$/</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2246</span> </span><span class="WHIT">			</span><span class="NAME">numberRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="REGX">/^\d*(?:\.\d+)?$/</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2247</span>
<span class='line'>2248</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.VALIDATE_OR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2249</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.VALIDATE_AND</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2250</span>
<span class='line'>2251</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.dialog.validate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>2252</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2253</span> </span><span class="WHIT">			</span><span class="NAME">functions</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2254</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2255</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2256</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2257</span> </span><span class="WHIT">					</span><span class="COMM">/**
<span class='line'>2258</span> 					 * It's important for validate functions to be able to accept the value
<span class='line'>2259</span> 					 * as argument in addition to this.getValue(), so that it is possible to
<span class='line'>2260</span> 					 * combine validate functions together to make more sophisticated
<span class='line'>2261</span> 					 * validators.
<span class='line'>2262</span> 					 */</span><span class="WHIT">
<span class='line'>2263</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.getValue</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.getValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2264</span>
<span class='line'>2265</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2266</span> </span><span class="WHIT">						</span><span class="NAME">relation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.VALIDATE_AND</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2267</span> </span><span class="WHIT">						</span><span class="NAME">functions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2268</span>
<span class='line'>2269</span> </span><span class="WHIT">					</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2270</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2271</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2272</span> </span><span class="WHIT">							</span><span class="NAME">functions.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2273</span> </span><span class="WHIT">						</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>2274</span> </span><span class="WHIT">							</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2275</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2276</span>
<span class='line'>2277</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2278</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2279</span> </span><span class="WHIT">						</span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2280</span> </span><span class="WHIT">						</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2281</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2282</span>
<span class='line'>2283</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2284</span> </span><span class="WHIT">						</span><span class="NAME">relation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2285</span>
<span class='line'>2286</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">relation</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.VALIDATE_AND</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2287</span> </span><span class="WHIT">					</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">functions.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2288</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2289</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">relation</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.VALIDATE_AND</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2290</span> </span><span class="WHIT">							</span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">functions</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2291</span> </span><span class="WHIT">						</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>2292</span> </span><span class="WHIT">							</span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">functions</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2293</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2294</span>
<span class='line'>2295</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">passed</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2296</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2297</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2298</span> </span><span class="WHIT">							</span><span class="NAME">alert</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2299</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.select</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.focus</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2300</span> </span><span class="WHIT">							</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.select</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.focus</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2301</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2302</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2303</span>
<span class='line'>2304</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2305</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2306</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2307</span>
<span class='line'>2308</span> </span><span class="WHIT">			</span><span class="NAME">regex</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">regex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2309</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2310</span> </span><span class="WHIT">				</span><span class="COMM">/*
<span class='line'>2311</span> 				 * Can be greatly shortened by deriving from functions validator if code size
<span class='line'>2312</span> 				 * turns out to be more important than performance.
<span class='line'>2313</span> 				 */</span><span class="WHIT">
<span class='line'>2314</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2315</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2316</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.getValue</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.getValue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2317</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">regex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2318</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2319</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2320</span> </span><span class="WHIT">							</span><span class="NAME">alert</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2321</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.select</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.focus</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2322</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2323</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.select</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2324</span> </span><span class="WHIT">								</span><span class="NAME">this.select</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2325</span> </span><span class="WHIT">							</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>2326</span> </span><span class="WHIT">								</span><span class="NAME">this.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2327</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2328</span> </span><span class="WHIT">						</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2329</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2330</span> </span><span class="WHIT">					</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2331</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2332</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2333</span>
<span class='line'>2334</span> </span><span class="WHIT">			</span><span class="NAME">notEmpty</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2335</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2336</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.regex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">notEmptyRegex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2337</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2338</span>
<span class='line'>2339</span> </span><span class="WHIT">			</span><span class="NAME">integer</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2340</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2341</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.regex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">integerRegex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2342</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2343</span>
<span class='line'>2344</span> </span><span class="WHIT">			</span><span class="STRN">'number'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2345</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2346</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.regex</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">numberRegex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2347</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2348</span>
<span class='line'>2349</span> </span><span class="WHIT">			</span><span class="NAME">equals</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2350</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2351</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.functions</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2352</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2353</span>
<span class='line'>2354</span> </span><span class="WHIT">			</span><span class="NAME">notEqual</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2355</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2356</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.functions</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2357</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2358</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2359</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2360</span>
<span class='line'>2361</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2362</span>
<span class='line'>2363</span> </span><span class="COMM">// Extend the CKEDITOR.editor class with dialog specific functions.</span><span class="WHIT">
<span class='line'>2364</span> </span><span class="NAME">CKEDITOR.tools.extend</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.editor.prototype</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2365</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends CKEDITOR.editor.prototype */</span><span class="WHIT">
<span class='line'>2366</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2367</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>2368</span> 		 * Loads and opens a registered dialog.
<span class='line'>2369</span> 		 * @param {String} dialogName The registered name of the dialog.
<span class='line'>2370</span> 		 * @see CKEDITOR.dialog.add
<span class='line'>2371</span> 		 * @example
<span class='line'>2372</span> 		 * CKEDITOR.instances.editor1.openDialog( 'smiley' );
<span class='line'>2373</span> 		 * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. null if the dialog name is not registered.
<span class='line'>2374</span> 		 */</span><span class="WHIT">
<span class='line'>2375</span> </span><span class="WHIT">		</span><span class="NAME">openDialog</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2376</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2377</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialogDefinitions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog._.dialogDefinitions</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2378</span>
<span class='line'>2379</span> </span><span class="WHIT">			</span><span class="COMM">// If the dialogDefinition is already loaded, open it immediately.</span><span class="WHIT">
<span class='line'>2380</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">dialogDefinitions</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2381</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2382</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">storedDialogs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._.storedDialogs</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>2383</span> </span><span class="WHIT">					</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this._.storedDialogs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2384</span>
<span class='line'>2385</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">storedDialogs</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>2386</span> </span><span class="WHIT">					</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">storedDialogs</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dialog</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2387</span>
<span class='line'>2388</span> </span><span class="WHIT">				</span><span class="NAME">dialog.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2389</span>
<span class='line'>2390</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">dialog</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2391</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2392</span>
<span class='line'>2393</span> </span><span class="WHIT">			</span><span class="COMM">// Not loaded? Load the .js file first.</span><span class="WHIT">
<span class='line'>2394</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">body</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.document.getBody</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2395</span> </span><span class="WHIT">				</span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">body.$.style.cursor</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>2396</span> </span><span class="WHIT">				</span><span class="NAME">me</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2397</span>
<span class='line'>2398</span> </span><span class="WHIT">			</span><span class="NAME">body.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cursor'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'wait'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2399</span> </span><span class="WHIT">			</span><span class="NAME">CKEDITOR.scriptLoader.load</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.getUrl</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialogDefinitions</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2400</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2401</span> </span><span class="WHIT">					</span><span class="NAME">me.openDialog</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">dialogName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2402</span> </span><span class="WHIT">					</span><span class="NAME">body.setStyle</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'cursor'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">cursor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2403</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2404</span>
<span class='line'>2405</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2406</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2407</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2408</span>
<span class='line'>2409</span> </span><span class="COMM">// Dialog related configurations.</span><span class="WHIT">
<span class='line'>2410</span>
<span class='line'>2411</span> </span><span class="COMM">/**
<span class='line'>2412</span>  * The color of the dialog background cover. It should be a valid CSS color
<span class='line'>2413</span>  * string.
<span class='line'>2414</span>  * @type String
<span class='line'>2415</span>  * @default white
<span class='line'>2416</span>  * @example
<span class='line'>2417</span>  * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
<span class='line'>2418</span>  */</span><span class="WHIT">
<span class='line'>2419</span> </span><span class="NAME">CKEDITOR.config.dialog_backgroundCoverColor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'white'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2420</span>
<span class='line'>2421</span> </span><span class="COMM">/**
<span class='line'>2422</span>  * The opacity of the dialog background cover. It should be a number within the
<span class='line'>2423</span>  * range [0.0, 1.0].
<span class='line'>2424</span>  * @type Number
<span class='line'>2425</span>  * @default 0.5
<span class='line'>2426</span>  * @example
<span class='line'>2427</span>  * config.dialog_backgroundCoverOpacity = 0.7;
<span class='line'>2428</span>  */</span><span class="WHIT">
<span class='line'>2429</span> </span><span class="NAME">CKEDITOR.config.dialog_backgroundCoverOpacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2430</span>
<span class='line'>2431</span> </span><span class="COMM">/**
<span class='line'>2432</span>  * The distance of magnetic borders used in moving and resizing dialogs,
<span class='line'>2433</span>  * measured in pixels.
<span class='line'>2434</span>  * @type Number
<span class='line'>2435</span>  * @default 20
<span class='line'>2436</span>  * @example
<span class='line'>2437</span>  * config.dialog_magnetDistance = 30;
<span class='line'>2438</span>  */</span><span class="WHIT">
<span class='line'>2439</span> </span><span class="NAME">CKEDITOR.config.dialog_magnetDistance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">20</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2440</span> </span></pre></body></html>
